Package: naomi 2.10.2

Jeff Eaton

naomi: Naomi Model for Subnational HIV Estimates

This package implements the Naomi model for subnational HIV estimates.

Authors:Jeff Eaton [aut, cre]

naomi_2.10.2.tar.gz
naomi_2.10.2.zip(r-4.5)naomi_2.10.2.zip(r-4.4)naomi_2.10.2.zip(r-4.3)
naomi_2.10.2.tgz(r-4.4-x86_64)naomi_2.10.2.tgz(r-4.4-arm64)naomi_2.10.2.tgz(r-4.3-x86_64)naomi_2.10.2.tgz(r-4.3-arm64)
naomi_2.10.2.tar.gz(r-4.5-noble)naomi_2.10.2.tar.gz(r-4.4-noble)
naomi_2.10.2.tgz(r-4.4-emscripten)
naomi.pdf |naomi.html
naomi/json (API)
NEWS

# Install 'naomi' in R:
install.packages('naomi', repos = c('https://mrc-ide.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/mrc-ide/naomi/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

7.73 score 9 stars 2 packages 55 scripts 94 exports 135 dependencies

Last updated 19 hours agofrom:31ba516ea9 (on master). Checks:OK: 1 WARNING: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-win-x86_64WARNINGNov 22 2024
R-4.5-linux-x86_64WARNINGNov 21 2024
R-4.4-win-x86_64WARNINGNov 22 2024
R-4.4-mac-x86_64WARNINGNov 21 2024
R-4.4-mac-aarch64WARNINGNov 21 2024
R-4.3-win-x86_64WARNINGNov 22 2024
R-4.3-mac-x86_64WARNINGNov 21 2024
R-4.3-mac-aarch64WARNINGNov 21 2024

Exports:%>%add_output_labelsage_bar_plotlyaggregate_ancaggregate_artalign_inputs_outputsanc_testing_artcov_mfanc_testing_clients_mfanc_testing_prev_mfartnum_mfbar_plotlybuild_hierarchy_labelcalculate_prevalence_art_coveragecalendar_quarter_labelscalendar_quarter_labels_shortcalendar_quarter_to_quartercalendar_quarter_to_quarter_idcalendar_quarter_to_yearcalibrate_outputscmc_dateconvert_calendar_quarterconvert_quarter_idcreate_adj_matrixcreate_area_aggregationcreate_areascreate_edge_listcut_naomi_age_groupdata_type_labelsdisaggregate_0to4_outputsdistrict_barplotextract_pjnz_naomiextract_pjnz_program_dataextract_shiny90_age_sexfit_tmbget_age_groupsget_anc_metadataget_area_collectionget_art_metadataget_five_year_age_groupsget_meta_indicatorget_metadataget_plot_type_column_metadataget_plotting_metadatahintr_calibratehintr_calibrate_plothintr_comparison_plothintr_prepare_agyw_downloadhintr_prepare_coarse_age_group_downloadhintr_prepare_comparison_report_downloadhintr_prepare_spectrum_downloadhintr_prepare_summary_report_downloadhintr_run_modelhintr_validate_programme_datainterpolate_population_agesexlog_linear_interpmap_outputsnaomi_model_framenaomi_objective_function_rnaomi_output_frameoutput_packagepop_pyramid_outputsprepare_input_time_series_ancprepare_input_time_series_artprepare_spectrum_naomi_comparisonprepare_tmb_inputsquarter_id_to_calendar_quarterquarter_labelsquarter_numberquarter_year_labelsread_anc_testingread_area_mergedread_art_numberread_hintr_outputread_output_packageread_populationread_spectrum_projection_nameread_spectrum_region_coderead_spectrum_region_nameread_survey_indicatorsreport_tmbsample_tmbsave_outputsave_output_packagescale_gmrf_precisionscatter_plotlyselect_naomi_dataspread_areassubset_output_packagesurvey_mfth_mapvalidate_model_optionswrite_datapack_csvwrite_navigator_checklistyear_labels

Dependencies:abindanclikaskpassassertthatbase64encBHbigDbinombitbit64bitopsbootbriobslibcachemcellrangerclassclassIntclicliprcolorspacecommonmarkcpp11crayoncrosstalkcurldata.tabledata.treeDBIdeldirdigestdplyre1071eppeppasmevaluatefansifarverfastmapfastmatchfirst90fontawesomeforcatsfsgenericsggplot2gluegtgtablehighrhmshtmltoolshtmlwidgetshttrisobandjquerylibjsonlitejuicyjuiceKernSmoothknitrlabelinglaterlatticelazyevallifecyclemagrittrmarkdownMASSMatrixmemoisemgcvmimemunsellmvtnormnaomi.optionsnlmeopensslopenxlsxpillarpkgconfigplotlyplyrprettyunitsprogresspromisesproxypurrrqsR6RApiSerializerappdirsRColorBrewerRcppRcppEigenRcppParallelreactablereactRreadrreadxlrematchreshape2rlangrmarkdowns2sassscalessfspspDataspdepstringfishstringistringrsystibbletidyrtidyselecttinytexTMBtraduiretzdbunitsutf8V8vctrsviridisLitevroomwithrwkwritexlxfunxml2yamlzipzoo

Naomi data model

Rendered fromdata-model.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2020-12-07
Started: 2019-08-28

Naomi Model Workflow Example

Rendered frommodel-workflow.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2024-11-18
Started: 2019-09-26

Readme and manuals

Help Manual

Help pageTopics
Add labels to output indicatorsadd_output_labels
Plotly barplot comparing age distribution of survey inputs and naomi outputsage_bar_plotly
Aggregate ANC data according to area hierarchyaggregate_anc
Aggregate ART data according to area hierarchyaggregate_art
Align model data inputs and model estimatesalign_inputs_outputs
Prepare Model Frames for Programme Datasetsanc_testing_artcov_mf anc_testing_clients_mf anc_testing_prev_mf
Build artnum model frameartnum_mf
Check whether PJNZ contains .shiny90 fileassert_pjnz_shiny90
Plotly barplot comparing geographical distribution of data inputs and naomi outputsbar_plotly
Return the translated label & description for a set of plot typesbuild_hierarchy_label
Calculate prevalence and ART coverage from ANC input datacalculate_prevalence_art_coverage
Calibrate naomi model outputscalibrate_outputs
Convert Date to Century Month Code (CMC)cmc_date
Create adjacency matrix from spatial polygonscreate_adj_matrix
Long data frame mapping area hierarchy areas to model level areascreate_area_aggregation
Create an Areas Objectcreate_areas
Create edgelist from adjacency matrixcreate_edge_list
Cut Five Year Age Groupscut_naomi_age_group
Get id to label mapping for calibration plot data typedata_type_labels
Programme data: Malawi routine HIV service delivery datademo_anc_testing demo_art_number
Malawi area boundaries.demo_area_boundaries
Malawi area hierarchydemo_area_hierarchy
Malawi area levels.demo_area_levels
Malawi age-sex stratified population datademo_population_agesex
Malawi survye biomarkersdemo_survey_biomarker
Malawi survey clustersdemo_survey_clusters
Malawi HIV indicatorsdemo_survey_hiv_indicators
Malawi survey individualsdemo_survey_individuals
Malawi survey metadatademo_survey_meta
Malawi survey regionsdemo_survey_regions
Disaggregate age 0-4 outputs to <1 / 1-4disaggregate_0to4_outputs
Create district bar plotdistrict_barplot
Automatically make drop drop buttons for plotly filterdropdown_buttons
Extract Model Inputs from Spectrum PJNZextract_pjnz_naomi
Extract ART and ANC testing program data inputs from Spectrum PJNZextract_pjnz_program_data
Export proportion aware by five year age group from Shiny90extract_shiny90_age_sex
Fit TMB modelfit_tmb
Data frame of age groupsget_age_groups
Metadata for ANC plot types used in the input time series plots. Mainly for internal use.get_anc_metadata
Get a collection of areasget_area_collection
Metadata for ART plot types used in the input time series plots. Mainly for internal use.get_art_metadata
Get 5 year age groupsget_five_year_age_groups
Get indicator metadataget_meta_indicator
Get indicator metadata as a data frameget_metadata
Return the translated label & description for a set of plot typesget_plot_type_column_metadata
Get plotting metadata for a particular countryget_plotting_metadata
Interpolate Spectrum to quarter_idget_spec_aggr_interpolation
Calibrate hintr_outputhintr_calibrate
Get data for hintr calibrate plothintr_calibrate_plot
Get data for hintr comparison plothintr_comparison_plot
Prepare AGYW tool downloadhintr_prepare_agyw_download
Prepare coarse age group downloadhintr_prepare_coarse_age_group_download
Prepare comparison report downloadhintr_prepare_comparison_report_download
Prepare spectrum downloadhintr_prepare_spectrum_download
Prepare summary report downloadhintr_prepare_summary_report_download
Run the model and save outputhintr_run_model
Run validation for subnational programme data inputhintr_validate_programme_data
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)Imports
Log-linear interpolation of age/sex stratified populationinterpolate_population_agesex
Log-linear interpolation of NA valueslog_linear_interp
Create output map plotmap_outputs
Construct Model Frames and Adjacency Structuresnaomi_model_frame
R implementation of Naomi modelnaomi_objective_function_r
Model Frame and Linear Transform for Aggregated Model Outputsnaomi_output_frame
Generate naomi warning for specific strata of simulated outputsoutput_naomi_warning
Build output package from fitoutput_package
Create population pyramid plotpop_pyramid_outputs
Prepare data for ANC input time series plotsprepare_input_time_series_anc
Prepare data for ART input time series plotsprepare_input_time_series_art
Compare aggregated subnational Naomi + spectrum totals for comparison tableprepare_spectrum_naomi_comparison
Prepare inputs for TMB model.prepare_tmb_inputs
Time period indexingcalendar_quarter_labels calendar_quarter_labels_short calendar_quarter_to_quarter calendar_quarter_to_quarter_id calendar_quarter_to_year convert_calendar_quarter convert_quarter_id quarter_id_to_calendar_quarter quarter_labels quarter_number quarter_year_labels year_labels
Read hintr outputread_hintr_output
Read Naomi structured input filesread_anc_testing read_area_merged read_art_number read_population read_survey_indicators
Read Spectrum Projection Name from Spectrum PJNZread_spectrum_projection_name
Read Subnational Region Code from Spectrum PJNZread_spectrum_region_code
Read Subnational Region Name from Spectrum PJNZread_spectrum_region_name
Calculate Posterior Mean and Uncertainty Via TMB 'sdreport()'report_tmb
Sample TMB fitsample_tmb
Save outputs to zip filesave_output
Save outputs to zip fileread_output_package save_output_package
Scale of GMRF precision matrixscale_gmrf_precision
Plotly scatterplot data inputs and naomi outputsscatter_plotly
Select data for model fittingselect_naomi_data
Spread area hierarchy to wide formatspread_areas
Subset the results returned in Naomi output packagesubset_naomi_output
Resave a subsetted Naomi output packagesubset_output_package
Prepare model frames for survey datasetssurvey_mf
'ggplot2' theme for plotting mapsth_map
Validate a set of model optionsvalidate_model_options
Export naomi outputs to PEPFAR Data Pack formatwrite_datapack_csv
Write UNAIDS Estimates Navigator checklist CSVwrite_navigator_checklist