hbv_ru_1999 | R Documentation |
A seroprevalence study conducted in St. Petersburg (more information in the book)
hbv_ru_1999
A data frame with 4 variables:
Age group
Number of seropositive individuals
Total number of individuals surveyed
Gender of cohort (unsure what 1 and 2 means)
Mukomolov, S., L. Shliakhtenko, I. Levakova, and E. Shargorodskaya. Viral hepatitis in Russian federation. An analytical overview. Technical Report 213 (3), 3rd edn. St Petersburg Pasteur Institute, St Petersburg, 2000.
# Reproduce Fig 4.2, p. 65
library(dplyr)
hbv_ru_1999$age <- trunc(hbv_ru_1999$age / 1) * 1
hbv_ru_1999$age[hbv_ru_1999$age > 40] <- trunc(
hbv_ru_1999$age[hbv_ru_1999$age > 40] / 5
) * 5
df <- hbv_ru_1999 %>%
group_by(age) %>%
summarise(pos = sum(pos), tot = sum(tot))
plot(
df$age, df$pos / df$tot,
cex = 0.05 * df$tot, pch = 16, xlab = "age",
ylab = "seroprevalence", xlim = c(0, 72)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.