An R-NIMBLE implementation of the enhanced modified Kalman filter (eMKF) tool for small domain estimation
Authors/Creators
- 1. CDC/NCHS (Contractor)
- 2. CDC
- 3. National Center for Health Statistics, CDC
Description
Brief Overview
This project contains the SAS and R code to implement the enhanced Modified Kalman Filter (eMKF). The enhanced MKF procedure enables production of model-based estimates for small populations where direct estimates may lack precision, improving the availability of data for assessing and monitoring health disparities. The enhanced MKF procedure and macro build on the earlier Modified Kalman Filter procedure (Setodji et al, 2011; Lockwood et al, 2011) to accommodate nonlinear time trends, irregularly spaced time points, and random sampling variances for the underlying population subgroup means, rates, or proportions. In version 2.4, the eMKF macro also allows for a trend break to be specified at a given timepoint, to capture survey redesigns or other interruptions or changes in the underlying data. Additionally, the eMKF macro version 2.4 ensures the autocorrelation coefficient for the AR(1) random effects remains nonnegative, which is required when time points are fractional (e.g., 2018.6). Bayesian estimation in the SAS eMKF macro is implemented adaptably and transparently using PROC MCMC and related SAS 9.4 procedures. The R eMKF macro ('Rmkf') uses R package 'nimble' (de Valpine et al, 2017, 2025) to implement Bayesian estimation. Model averaging in the SAS and R eMKF macros uses a Bayesian mixture prior approach and renders predictions more robust to polynomial trend misspecification. Various other features in the SAS eMKF macro also improve its functionality, flexibility, and usability relative to the earlier SAS MKF macro. Comprehensive technical guidance for using the SAS eMKF macro is provided in Talih et al (2024). An evaluation of the eMKF approach in the context of small subpopulation data from the National Center for Health Statistics is available in Rossen et al (2024).
Requires
- SAS 9.4 for the SAS eMKF macro
- R 4.4.0 or higher for the R eMKF macro, with R 'nimble' version 1.3.0 or higher.
References
- de Valpine, P., D. Turek, C.J. Paciorek, C. Anderson-Bergman, D. Temple Lang, and R. Bodik. 2017. Programming with models: writing statistical algorithms for general model structures with NIMBLE. Journal of Computational and Graphical Statistics 26: 403-413. https://doi.org/10.1080/10618600.2016.1172487.
- de Valpine P, Paciorek C, Turek D, Michaud N, Anderson-Bergman C, Obermeyer F, Wehrhahn Cortes C, Rodrìguez A, Temple Lang D, Paganin S (2025). NIMBLE: MCMC, Particle Filtering, and Programmable Hierarchical Modeling. https://doi.org/10.5281/zenodo.1211190, R package version 1.4.0, https://cran.r-project.org/package=nimble.
- Lockwood JR, McCaffrey DF, Setodji CM, Elliott MN. Smoothing across time in repeated cross-sectional data. Stat Med 30(5):584–94. 2011. https://dx.doi.org/10.1002/sim.3897.
- Rossen LM, Talih M, Patel P, Earp M, Parker JD. Evaluation of an enhanced modified Kalman filter approach for estimating health outcomes in small subpopulations. National Center for Health Statistics. Vital Health Stat 2(208). 2024. doi:10.15620/cdc/157496. Available from: https://www.cdc.gov/nchs/data/series/sr_02/sr02-208.pdf.
- Setodji CM, Lockwood JR, McCaffrey DF, Elliott MN, Adams JL. The Modified Kalman Filter macro: User's guide. RAND Technical Report No. TR-997-DHHS. 2011. Available from: https://www.rand.org/pubs/technical_reports/TR997.html.
- Talih M, Rossen LM, Patel P, Earp M, Parker JD. Technical guidance for using the modified Kalman filter in small-domain estimation at the National Center for Health Statistics. National Center for Health Statistics. Vital Health Stat 2(209). 2024. doi:10.15620/cdc/157496. Available from: https://www.cdc.gov/nchs/data/series/sr_02/sr02-209.pdf.
Release Notes
Detailed requirements and release notes are described in: https://github.com/CDCgov/eMKF/blob/main/README.md
What's Changed
- Update README.md by @mtalih in https://github.com/CDCgov/eMKF/pull/1
- GitHub repo stats by @ppat115 in https://github.com/CDCgov/eMKF/pull/2
- GitHub repo stats by @ppat115 in https://github.com/CDCgov/eMKF/pull/3
New Contributors
- @mtalih made their first contribution in https://github.com/CDCgov/eMKF/pull/1
- @ppat115 made their first contribution in https://github.com/CDCgov/eMKF/pull/2
Full Changelog: https://github.com/CDCgov/eMKF/commits/version_2.4_2026-01-30
Files
CDCgov/eMKF-version_2.4_2026-01-30.zip
Files
(2.9 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:bd6b005a4a78728206a34e56fc19a6e6
|
2.9 MB | Preview Download |
Additional details
Additional titles
- Alternative title
- The enhanced modified Kalman filter (eMKF) tool for small domain estimation
Related works
- Is supplement to
- Software: https://github.com/CDCgov/eMKF/tree/version_2.4_2026-01-30 (URL)
Software
- Repository URL
- https://github.com/CDCgov/eMKF
- Programming language
- R , SAS
- Development Status
- Active