Calibrate naomi model outputs

calibrate_outputs(
  output,
  naomi_mf,
  spectrum_plhiv_calibration_level,
  spectrum_plhiv_calibration_strat,
  spectrum_artnum_calibration_level,
  spectrum_artnum_calibration_strat,
  spectrum_aware_calibration_level,
  spectrum_aware_calibration_strat,
  spectrum_infections_calibration_level,
  spectrum_infections_calibration_strat,
  calibrate_method = "logistic"
)

Arguments

output

Naomi model output package produced by output_package().

naomi_mf

Naomi model frame, objective of class naomi_mf.

spectrum_plhiv_calibration_level

Level to calibrate PLHIV, see details.

spectrum_plhiv_calibration_strat

Age/sex stratification to calibrate PLHIV, see details.

spectrum_artnum_calibration_level

Level to calibrate number on ART, see details.

spectrum_artnum_calibration_strat

Age/sex stratification to calibrate number on ART, see details.

spectrum_aware_calibration_level

Level to calibrate number aware of HIV positive status, see details.

spectrum_aware_calibration_strat

Age/sex stratification to calibrate number aware of HIV positive status, see details.

spectrum_infections_calibration_level

Level to calibrate number infections of HIV positive status, see details.

spectrum_infections_calibration_strat

Age/sex stratification to calibrate number infections of HIV positive status, see details.

calibrate_method

Calibration method, either "logistic" (default) or "proportional".

Details

The following indicators are calibrated:

  • plhiv

  • art_current_residents

  • unaware_plhiv_num

  • infections

  • art_current (attending)

  • aware_plhiv_num

  • untreated_plhiv_num

  • prevalence

  • art_coverage

  • aware_plhiv_prop

  • incidence

  • plhiv_attend

  • aware_plhiv_attend

Steps in the calibration:

  1. Aggregate Spectrum totals to specified stratification by level/sex/age to calculate the target totals within each stratification.

  2. Adjust fine area/sex/age-group mean values to match targeted total using either "logistic" or "proportional" scaling.

  3. Aggregate revised mean count values to all stratifications of Naomi outputs.

  4. Calculate calibrated mean for proportion indicators.

  5. Adjust outputs for all statistics (mean, median, mode, se, range).

  6. Aggregate totals spectrum_calibration table.

The "logistic" scaling method converts fine counts to logit proportions, then uses numerical optimisation to solve the logit-scale adjustment to the fine district/sex/age proportions such that the adjusted proportions times the denominator sums to the target value.

Calibration proceeds sequentially through the following indicators.

  • PLHIV

  • Number of residents on ART

  • Number unaware of HIV status

  • Number of new infections

  • Number of attending ANC by district

Calibration of a previous indicator may affect the denominator for the next indicator. This does not affect the calculation for proportional scaling, but will affect logistic scaling. Inconsistent selections for calibration levels or stratifications could result in a denominator smaller than a target numerator for a particular value. This will throw an error for logistic scaling methods.

The number of attending ARG clients is always calibrated proportionally by sex and five-year age group to the number or residents attending.