evertest | R Documentation |
This function calculates proportion of ever tested among a population stratified by age group, sex, HIV status, and year.
evertest(mod, fp, df, VERSION = "C")
mod |
simulation model output |
fp |
simulation model parameter inputs |
df |
a data.frame with indices for prediction, see Details. |
Age groups are specified in terms of aggregate HIV age groups: 15-16, 17-19, 20-24, ..., 45-49, 50+. Another function could be added to handle other age groups if needed, with additional computational complexity.
The argument df must contain the following columns:
haidx: HIV age group (1 = 15-16, 2 = 17-19, 3 = 20-24, ..., 8 = 45-49, 9 = 50+)
sidx: sex (1 = male, 2 = female, 0 = both)
hvidx: HIV status (1 = negative, 2 = positive, 0 = all)
yidx: year index
hagspan: number of HIV age groups to span
a vector
## Not run:
data(survey_hts)
dat <- subset(survey_hts, country == "Malawi" & outcome == "evertest")
df <- add_ss_indices(dat, fp$ss)
df$pred <- evertest(mod, fp, df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.