select_naomi_data.Rd
Select data for model fitting
select_naomi_data(
naomi_mf,
survey_hiv_indicators,
anc_testing,
art_number,
prev_survey_ids,
artcov_survey_ids,
recent_survey_ids,
vls_survey_ids = NULL,
artnum_calendar_quarter_t1 = naomi_mf[["calendar_quarter1"]],
artnum_calendar_quarter_t2 = naomi_mf[["calendar_quarter2"]],
anc_clients_year_t2 =
year_labels(calendar_quarter_to_quarter_id(naomi_mf[["calendar_quarter2"]])),
anc_clients_year_t2_num_months = 12,
anc_prev_year_t1 =
year_labels(calendar_quarter_to_quarter_id(naomi_mf[["calendar_quarter1"]])),
anc_prev_year_t2 =
year_labels(calendar_quarter_to_quarter_id(naomi_mf[["calendar_quarter2"]])),
anc_artcov_year_t1 = anc_prev_year_t1,
anc_artcov_year_t2 = anc_prev_year_t2,
use_kish_prev = TRUE,
deff_prev = 1,
use_kish_artcov = TRUE,
deff_artcov = 1,
use_kish_recent = TRUE,
deff_recent = 1,
use_kish_vls = TRUE,
deff_vls = 1,
use_survey_aggregate = FALSE,
spec_program_data = NULL
)
A Naomi model frame object.
Data frame of survey estimates, or NULL to exclude any survey data.
Data frame of ANC routine testing outcomes, or NULL to exclude any ANC data.
Data frame of number currently receiving ART, or NULL to exclude any ART data.
A character vector of survey_id
s for prevalence data.
A character vector of survey_id
s for ART coverage data.
A character vector of survey_id
s for recent HIV infection status.
A character vector of survey_id
s for survey VLS among all HIV+ persons.
Calendar quarter for first time point for number on ART.
Calendar quarter for second time point for number on ART.
Calendar year (possibly multiple) for number of ANC clients at year 2.
Calendar year (possibly multiple) for first time point for ANC prevalence.
Calendar year (possibly multiple) for second time point for ANC prevalence.
Calendar year (possibly multiple) for first time point for ANC ART coverage.
Calendar year (possibly multiple) for second time point for ANC ART coverage.
Approximate design effect for survey prevalence.
Approximate design effect for survey ART coverage.
Approximate design effect for survey proportion recently infected.
Approximate design effect for survey viral load suppression.
Object of class "spec_program_data"
consisting of aggregated program data inputs to Spectrum. Provided for checking against Naomi inputs. If NULL
then checks are not conducted.
Number of months of reporting reflected in the year(s) recorded in anc_clients_year_t2
.
See example datasets for examples of required template for data sets. *_survey_ids
must be reflected
in survey_hiv_indicators
.
ART coverage and VLS survey data should not be included from the same survey. This is checked by the function call and will throw an error.
The deff_*
arguments are approximate design effects used to scale the effective sample size for survey
observations. Stratified design effects are will not be the same as full survey DEFF and there is not
a straightforward way to approximate these.
The option use_aggregate_survey = TRUE
allows for aggregate versions of survey data to be used in model
fitting, for example age 15-49 prevalence instead of five-year age group prevalence or province-level
survey data instead of district level data. This maybe useful if cluster coordinates or survey microdata
are not available. This option assumes that the survey_hiv_indicators
is alreaddy subsetted to exactly
the data to be used. All stratifications must also appear in the naomi_data$mf_out
stratifications.