Package: mcmsector 1.0.2

mcmsector: Estimating Subnational Public and Private Contraceptive Supply Shares Over Time

Engaging the private sector in contraceptive method supply is critical for equitable, sustainable, and accessible healthcare systems. This package implements Bayesian hierarchical models to estimate public and private contraceptive supply shares over time at national and subnational levels, using Demographic and Health Survey (DHS) data. Penalized splines are used to track supply shares over time, and spatial correlation structures link national and subnational estimates in data- sparse settings. For more details see Comiskey (2025) <doi:10.48550/arXiv.2510.25153>.

Authors:Hannah Comiskey [aut, cre], David Fraizer [aut], Ole Maneesoonthorn [aut]

mcmsector_1.0.2.tar.gz
mcmsector_1.0.2.zip(r-4.7)mcmsector_1.0.2.zip(r-4.6)mcmsector_1.0.2.zip(r-4.5)
mcmsector_1.0.2.tgz(r-4.6-any)mcmsector_1.0.2.tgz(r-4.5-any)
mcmsector_1.0.2.tar.gz(r-4.7-any)mcmsector_1.0.2.tar.gz(r-4.6-any)
mcmsector_1.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
mcmsector/json (API)

# Install 'mcmsector' in R:
install.packages('mcmsector', repos = c('https://hannahcomiskey.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:
  • Country_classification - The Country and area classification according to the United Nations Standaistical Division, Standard country or area codes for statistical use (M49). Adapted for use in FP2030 by the Track20 project. A subset of data from the United Nations country classifications
  • country_codes_DHS - Country Codes for DHS Surveys
  • DEFT_DHS_database - DEFT_DHS_database A database of the design effects for some of the DHS surveys in the national and subnational datasets. Due to due to multistage and clustering of the DHS sample, the average standard error is increased by a design effect (DEFT) factor over that in an equivalent simple random sample.
  • subnat_bivar_data - DHS survey observations for the proportion of modern contraceptives supplied by the public and private sectors at the subnational level

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

1.00 score 412 downloads 12 exports 46 dependencies

Last updated from:b86ddc4bf7. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK181
source / vignettesOK206
linux-release-x86_64OK176
macos-release-arm64OK143
macos-oldrel-arm64OK189
windows-develOK122
windows-releaseOK107
windows-oldrelOK132
wasm-releaseOK136

Exports:add_index_variablesbuild_jags_inputsbuild_spline_basisclean_fp_source_datacompute_T_starextract_mcmsector_paramsfix_region_namesreplace_small_or_missing_serun_preprocessing_pipelinesimulate_posterior_proportionsstandardize_country_namessummarise_posterior_proportions

Dependencies:bitbit64clicliprcpp11crayonDBIdplyrforcatsgenericsgluehavenhmslabelledlatticelifecyclemagrittrMatrixminqamitoolsnumDerivopenxlsxpillarpkgconfigplyrprettyunitsprogresspurrrR6RcppRcppArmadilloreadrrlangstringistringrsurveysurvivaltibbletidyrtidyselecttzdbutf8vctrsvroomwithrzip

Readme and manuals

Help Manual

Help pageTopics
Create index variables for subnational modellingadd_index_variables
Build JAGS metadata objectsbuild_jags_inputs
Build a B-spline basis for each subnational areabuild_spline_basis
Clean Subnational Family Planning Source Dataclean_fp_source_data
Compute T* (last observed year per subnational area)compute_T_star
The Country and area classification according to the United Nations Standaistical Division, Standard country or area codes for statistical use (M49). Adapted for use in FP2030 by the Track20 project. A subset of data from the United Nations country classificationsCountry_classification
Country Codes for DHS Surveyscountry_codes_DHS
DEFT_DHS_database A database of the design effects for some of the DHS surveys in the national and subnational datasets. Due to due to multistage and clustering of the DHS sample, the average standard error is increased by a design effect (DEFT) factor over that in an equivalent simple random sample.DEFT_DHS_database
Extract alpha_pms and beta.k MCMC samples from a JAGS model objectextract_mcmsector_params
Harmonise Region Names for Selected Countriesfix_region_names
High-level preprocessing pipelinerun_preprocessing_pipeline
Simulate posterior public/private proportions from alpha and beta parameterssimulate_posterior_proportions
Standardise country names and attach super-region classificationstandardize_country_names
DHS survey observations for the proportion of modern contraceptives supplied by the public and private sectors at the subnational levelsubnat_bivar_data
Summarise posterior probability samples into mean and quantilessummarise_posterior_proportions