All functions

Imports

We need to import these as they are used by dependencies (first90) unalified and need to be available in the package environment for the tests to be able to run in a background progress (i.e. when running in parllel)

add_output_labels()

Add labels to output indicators

age_bar_plotly()

Plotly barplot comparing age distribution of survey inputs and naomi outputs

aggregate_anc()

Aggregate ANC data according to area hierarchy

aggregate_art()

Aggregate ART data according to area hierarchy

align_inputs_outputs()

Align model data inputs and model estimates

anc_testing_prev_mf() anc_testing_artcov_mf() anc_testing_clients_mf()

Prepare Model Frames for Programme Datasets

artnum_mf()

Build artnum model frame

assert_pjnz_shiny90()

Check whether PJNZ contains .shiny90 file

bar_plotly()

Plotly barplot comparing geographical distribution of data inputs and naomi outputs

build_hierarchy_label()

Return the translated label & description for a set of plot types

calculate_prevalence_art_coverage()

Calculate prevalence and ART coverage from ANC input data

calibrate_outputs()

Calibrate naomi model outputs

cmc_date()

Convert Date to Century Month Code (CMC)

create_adj_matrix()

Create adjacency matrix from spatial polygons

create_area_aggregation()

Long data frame mapping area hierarchy areas to model level areas

create_areas()

Create an Areas Object

create_edge_list()

Create edgelist from adjacency matrix

cut_naomi_age_group()

Cut Five Year Age Groups

data_type_labels()

Get id to label mapping for calibration plot data type

demo_anc_testing demo_art_number

Programme data: Malawi routine HIV service delivery data

demo_area_boundaries

Malawi area boundaries.

demo_area_hierarchy

Malawi area hierarchy

demo_area_levels

Malawi area levels.

demo_population_agesex

Malawi age-sex stratified population data

demo_survey_biomarker

Malawi survye biomarkers

demo_survey_clusters

Malawi survey clusters

demo_survey_hiv_indicators

Malawi HIV indicators

demo_survey_individuals

Malawi survey individuals

demo_survey_meta

Malawi survey metadata

demo_survey_regions

Malawi survey regions

disaggregate_0to4_outputs()

Disaggregate age 0-4 outputs to <1 / 1-4

district_barplot()

Create district bar plot

dropdown_buttons()

Automatically make drop drop buttons for plotly filter

extract_pjnz_naomi()

Extract Model Inputs from Spectrum PJNZ

extract_pjnz_program_data()

Extract ART and ANC testing program data inputs from Spectrum PJNZ

extract_shiny90_age_sex()

Export proportion aware by five year age group from Shiny90

fit_tmb()

Fit TMB model

get_age_groups()

Data frame of age groups

get_anc_metadata()

Metadata for ANC plot types used in the input time series plots. Mainly for internal use.

get_area_collection()

Get a collection of areas

get_art_metadata()

Metadata for ART plot types used in the input time series plots. Mainly for internal use.

get_five_year_age_groups()

Get 5 year age groups

get_meta_indicator()

Get indicator metadata

get_metadata()

Get indicator metadata as a data frame

get_plot_type_column_metadata()

Return the translated label & description for a set of plot types

get_plotting_metadata()

Get plotting metadata for a particular country

get_spec_aggr_interpolation()

Interpolate Spectrum to quarter_id

hintr_calibrate()

Calibrate hintr_output

hintr_calibrate_plot()

Get data for hintr calibrate plot

hintr_comparison_plot()

Get data for hintr comparison plot

hintr_prepare_agyw_download()

Prepare AGYW tool download

hintr_prepare_coarse_age_group_download()

Prepare coarse age group download

hintr_prepare_comparison_report_download()

Prepare comparison report download

hintr_prepare_datapack_download()

Prepare Datapack download

hintr_prepare_spectrum_download()

Prepare spectrum download

hintr_prepare_summary_report_download()

Prepare summary report download

hintr_run_model()

Run the model and save output

hintr_validate_anc_programme_data()

Run validation for subnational programme data input

hintr_validate_art_programme_data()

Run validation for subnational programme data input

interpolate_population_agesex()

Log-linear interpolation of age/sex stratified population

log_linear_interp()

Log-linear interpolation of NA values

map_outputs()

Create output map plot

naomi_model_frame()

Construct Model Frames and Adjacency Structures

naomi_objective_function_r()

R implementation of Naomi model

naomi_output_frame()

Model Frame and Linear Transform for Aggregated Model Outputs

output_naomi_warning()

Generate naomi warning for specific strata of simulated outputs

output_package()

Build output package from fit

pop_pyramid_outputs()

Create population pyramid plot

prepare_input_time_series_anc()

Prepare data for ANC input time series plots

prepare_input_time_series_art()

Prepare data for ART input time series plots

prepare_spectrum_naomi_comparison()

Compare aggregated subnational Naomi + spectrum totals for comparison table

prepare_tmb_inputs()

Prepare inputs for TMB model.

quarter_year_labels() quarter_number() quarter_labels() calendar_quarter_labels() calendar_quarter_labels_short() year_labels() convert_quarter_id() convert_calendar_quarter() calendar_quarter_to_quarter_id() quarter_id_to_calendar_quarter() calendar_quarter_to_year() calendar_quarter_to_quarter()

Time period indexing

read_hintr_output()

Read hintr output

read_population() read_survey_indicators() read_art_number() read_anc_testing() read_area_merged()

Read Naomi structured input files

read_spectrum_projection_name()

Read Spectrum Projection Name from Spectrum PJNZ

read_spectrum_region_code()

Read Subnational Region Code from Spectrum PJNZ

read_spectrum_region_name()

Read Subnational Region Name from Spectrum PJNZ

report_tmb()

Calculate Posterior Mean and Uncertainty Via TMB sdreport()

sample_tmb()

Sample TMB fit

save_output()

Save outputs to zip file

save_output_package() read_output_package()

Save outputs to zip file

scale_gmrf_precision()

Scale of GMRF precision matrix

scatter_plotly()

Plotly scatterplot data inputs and naomi outputs

select_naomi_data()

Select data for model fitting

spread_areas()

Spread area hierarchy to wide format

subset_naomi_output()

Subset the results returned in Naomi output package

subset_output_package()

Resave a subsetted Naomi output package

survey_mf()

Prepare model frames for survey datasets

th_map()

ggplot2 theme for plotting maps

validate_model_options()

Validate a set of model options

write_datapack_csv()

Export naomi outputs to PEPFAR Data Pack format

write_navigator_checklist()

Write UNAIDS Estimates Navigator checklist CSV