Skip to content

Add age and country to enteric fever vignette#110

Open
kristinawlai wants to merge 17 commits intomainfrom
age-country-EntericFever
Open

Add age and country to enteric fever vignette#110
kristinawlai wants to merge 17 commits intomainfrom
age-country-EntericFever

Conversation

@kristinawlai
Copy link
Copy Markdown
Collaborator

@kristinawlai kristinawlai commented Mar 19, 2024

Added country overall and age category by country. @kaiemjoy will this work for now?

@kristinawlai kristinawlai marked this pull request as ready for review March 19, 2024 00:38
Copy link
Copy Markdown
Collaborator

@kaiemjoy kaiemjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks Kristina. I few small requests to make before merging:

  1. 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"
  2. Can you rank the bar graph from highest to lowest? (or lowest to highest also fine)

@kaiemjoy
Copy link
Copy Markdown
Collaborator

Also standardize ggplots using theme_linedraw()

@kristinawlai
Copy link
Copy Markdown
Collaborator Author

Sure thing!

  1. 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"

@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?

  1. Can you rank the bar graph from highest to lowest? (or lowest to highest also fine)

Done!

Also standardize ggplots using theme_linedraw()

Done!

@kaiemjoy
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member

@d-morrison d-morrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this PR back in draft-mode?

@kristinawlai
Copy link
Copy Markdown
Collaborator Author

Updated and left country alone and the old Pakistan catchment examples.

@kristinawlai kristinawlai requested a review from d-morrison March 29, 2024 18:28
Copy link
Copy Markdown
Member

@d-morrison d-morrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make each sentence a separate line in the .Rmd file; it's a lot easier to track changes and provide feedback that way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kristinawlai kristinawlai marked this pull request as draft April 28, 2024 16:38
@kaiemjoy kaiemjoy marked this pull request as ready for review April 30, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants