Add age and country to enteric fever vignette#110
Add age and country to enteric fever vignette#110kristinawlai wants to merge 17 commits intomainfrom
Conversation
There was a problem hiding this comment.
Looks great, thanks Kristina. I few small requests to make before merging:
- let's take out the age&site specific estimates for now and move them over to the posit project we are prepping, "EF Seroincidence Estimates"
- Can you rank the bar graph from highest to lowest? (or lowest to highest also fine)
|
Also standardize ggplots using theme_linedraw() |
|
Sure thing!
@kaiemjoy Can we discuss where exactly to add this in? Just need clarity on where/how it fits with what's already in posit. And do you mean remove it from the EF vignette entirely?
Done!
Done! |
|
yes lets move the age-country for the EF vignette entirely for now. I'm working on a script right now in posit called seap_sees_compare that this can go in |
d-morrison
left a comment
There was a problem hiding this comment.
Is this PR back in draft-mode?
|
Updated and left country alone and the old Pakistan catchment examples. |
d-morrison
left a comment
There was a problem hiding this comment.
a few recommended changes below!
|
|
||
| ## Conclusions | ||
| In our data, we find that the overall estimated seroincidence of enteric fever in Pakistan is 153 per 1000 person-years (95% CI: 139, 169). When stratified by catchment area, we find that area KGH has a higher incidence rate than area AKU [204 per 1000 person-years (95% CI: 176, 237) vs. 125 per 1000 person-years (95% CI: 109, 143)]. | ||
| We find that Bangladesh has the highest overall seroincidence of enteric fever with a rate of `r round(est_countrydf$incidence.rate[1] * 1000)` per 1000 person-years, as well as the highest seroincidence by age category. In comparison, Nepal has a seroincidence rate over `r round((est_countrydf$incidence.rate[1])/(est_countrydf$incidence.rate[2]))` times lower than that of Bangladesh (`r round(est_countrydf$incidence.rate[2] * 1000)` per 1000 person-years) and the lowest age-specific seroincidence rates of the three countries in the study. **serocalculator** provides an efficient tool to conduct this analysis and produce actionable results. |
There was a problem hiding this comment.
Please make each sentence a separate line in the .Rmd file; it's a lot easier to track changes and provide feedback that way.
There was a problem hiding this comment.
Please pre-calculate the numbers that you want to include inline; for example, in the chunk above, round((est_countrydf$incidence.rate[1])/(est_countrydf$incidence.rate[2])) could be replaced by rate_ratio_nepal_bangla which would be calculated in an earlier R chunk. (this is also for reviewability and transparency of calculations to the readers).
| @@ -262,14 +299,14 @@ ggplot(est2df, aes(y=catchment, x=incidence.rate*1000, fill=catchment)) + | |||
| x="Seroincience rate per 1000 person-years", | |||
There was a problem hiding this comment.
there's a typo here ("Seroincience")
| theme_bw() + | ||
| theme_linedraw() + | ||
| theme(axis.text.y = element_text(size=11), | ||
| axis.text.x = element_text(size=11)) |
There was a problem hiding this comment.
Has this plot been turned into a function yet? If so, please use it; otherwise, please create the function! Same with any other plots that take more than ~5 lines of construction.
Merge branch 'age-country-EntericFever' of https://github.com/UCD-SERG/serocalculator into age-country-EntericFever # Conflicts: # vignettes/articles/enteric_fever_example.Rmd
Added country overall and age category by country. @kaiemjoy will this work for now?