Skip to contents

mpindex 0.3.0

Breaking changes

New features

  • compute_mpi() — single-call API with inline deprived() cutoffs and a by argument for disaggregation.
  • compute_mpi_from_profile() — lower-level entry point for pre-assembled deprivation profiles (replaces the old compute_mpi() signature).
  • deprived() — captures a bare cutoff expression and optional per-indicator settings (collapse_fn, set_na_equal_to; .data is unchanged).
  • global_mpi_specs() — loads the built-in Global MPI specification. Replaces use_global_mpi_specs().
  • compute_mpi() returns an object of class mpi_output.
  • Survey-weighted MPI via weight, strata, cluster, fpc or a pre-built survey::svydesign() object (survey_design) in both compute_mpi() and compute_mpi_from_profile(). The survey package is a soft dependency (Suggests).
  • inference = TRUE appends design-based standard errors and confidence intervals as *_se, *_ci_low, *_ci_high columns. Confidence level configurable via ci_level (default 0.95).

Improvements

Tests

  • 51 new unit tests for the survey-weighted path covering both input methods, point-estimate correctness, SE/CI columns, by disaggregation, and backward-compatibility.

Documentation

  • Main vignette rewritten with plain-language explanations and a step-by-step narrative.
  • New vignette: Survey-Weighted MPI — covers both input paths, inference columns, subgroup disaggregation, and a weighted vs. unweighted comparison.

mpindex 0.2.1

CRAN release: 2024-01-09

  • Changed returned value of define_mpi_specs from list to data frame with a class of mpi_specs_df. By default, it stores a global option named mpi_specs which can be accessed using getOption('mpi_specs'). Other specifications are now stored as attributes.
  • Changed default value of .unit_of_analysis from households to NULL.
  • save_mpi now allows unformatted output (tidy format) when generating an output.
  • Implemented feature to include MPI specification in the output by setting .include_specs tot TRUE in save_mpi.
  • Deprecated .names_separator argument in define_mpi_specs.
  • Enhancement of define_deprivation based on #17.
  • Added use_global_mpi_specs() wrapper function to use Global MPI specification.