Interface for Multilevel Regression and Poststratification
Return example MRPModel
object with estimation results.
Return example poststratification data
Return example data
Create a new MRPWorkflow object
Check if poststratification has been performed
Check if model has been fitted
Return sampling diagnostics
Fit multilevel regression model using cmdstanr
Return model formula
Create inputs for leave-one-out cross-validation
Return model metadata.
Return model specification
Run poststratification to generate population estimates
Create input for posterior predictive check
Save model object to file
Return model Stan code.
Return posterior summary table
MRPModel objects
Compare models using LOO-CV
Create geographic covariate distribution histogram
Create a new MRPModel object
Create demographic comparison bar plots
Create a choropleth map of MRP estimates
Visualize estimates for demographic groups
Link sample data to ACS data
Load custom poststratification data
Visualize raw outcome measure by geography
Create summary plots of the outcome measure
Perform posterior predictive check
Preprocess sample data
Return preprocessed sample data
Create sample size map
MRPWorkflow objects
Run the Shiny Application
shinymrp: Interface for Multilevel Regression and Poststratification
Dual interfaces, graphical and programmatic, designed for intuitive applications of Multilevel Regression and Poststratification (MRP). Users can apply the method to a variety of datasets, from electronic health records to sample survey data, through an end-to-end Bayesian data analysis workflow. The package provides robust tools for data cleaning, exploratory analysis, flexible model building, and insightful result visualization. For more details, see Si et al. (2020) <https://www150.statcan.gc.ca/n1/en/pub/12-001-x/2020002/article/00003-eng.pdf?st=iF1_Fbrh> and Si (2025) <doi:10.1214/24-STS932>.
Useful links