shinymrp0.9.0 package

Interface for Multilevel Regression and Poststratification

example_model

Return example MRPModel object with estimation results.

example_pstrat_data

Return example poststratification data

example_sample_data

Return example data

mrp_workflow

Create a new MRPWorkflow object

MRPModel-method-check_estimate_exists

Check if poststratification has been performed

MRPModel-method-check_fit_exists

Check if model has been fitted

MRPModel-method-diagnostics

Return sampling diagnostics

MRPModel-method-fit

Fit multilevel regression model using cmdstanr

MRPModel-method-formula

Return model formula

MRPModel-method-log_lik

Create inputs for leave-one-out cross-validation

MRPModel-method-metadata

Return model metadata.

MRPModel-method-model_spec

Return model specification

MRPModel-method-poststratify

Run poststratification to generate population estimates

MRPModel-method-ppc

Create input for posterior predictive check

MRPModel-method-save

Save model object to file

MRPModel-method-stan_code

Return model Stan code.

MRPModel-method-summary

Return posterior summary table

MRPModel

MRPModel objects

MRPWorkflow-method-compare_models

Compare models using LOO-CV

MRPWorkflow-method-covar_hist

Create geographic covariate distribution histogram

MRPWorkflow-method-create_model

Create a new MRPModel object

MRPWorkflow-method-demo_bars

Create demographic comparison bar plots

MRPWorkflow-method-estimate_map

Create a choropleth map of MRP estimates

MRPWorkflow-method-estimate_plot

Visualize estimates for demographic groups

MRPWorkflow-method-link_acs

Link sample data to ACS data

MRPWorkflow-method-load_pstrat

Load custom poststratification data

MRPWorkflow-method-outcome_map

Visualize raw outcome measure by geography

MRPWorkflow-method-outcome_plot

Create summary plots of the outcome measure

MRPWorkflow-method-pp_check

Perform posterior predictive check

MRPWorkflow-method-preprocess

Preprocess sample data

MRPWorkflow-method-preprocessed_data

Return preprocessed sample data

MRPWorkflow-method-sample_size_map

Create sample size map

MRPWorkflow

MRPWorkflow objects

run_app

Run the Shiny Application

shinymrp-package

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>.

  • Maintainer: Toan Tran
  • License: MIT + file LICENSE
  • Last published: 2025-10-09