diagnosed: Proportion diagnosed among HIV+ by age, sex, or HIV status

View source: R/outputs.R

diagnosedR Documentation

Proportion diagnosed among HIV+ by age, sex, or HIV status

Description

This function calculates proportion diagnosed among the HIV positive population stratified by age group, sex, HIV status, and year.

Usage

diagnosed(mod, fp, df, VERSION = "C")

Arguments

mod

simulation model output

fp

simulation model parameter inputs

df

a data.frame with indices for prediction, see Details.

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)

  • yidx: year index

  • hagspan: number of HIV age groups to span

Value

a vector

Examples


## Not run: 
data(survey_hts)
dat <- subset(survey_hts, country == "Malawi" & outcome == "aware")
df <- add_ss_indices(dat, fp$ss)

df$pred <- diagnosed(mod, fp, df)

## End(Not run)


mrc-ide/first90release documentation built on Nov. 22, 2024, 5:02 a.m.