/pymrp

Python implementation of multilevel regression and poststratification using pyStan

Primary LanguagePythonGNU Lesser General Public License v3.0LGPL-3.0

Readme

This project implements methods that make it easier to use pystan and stan-arm (R package) for multi-level regression and post-stratification (MRP).

NOTE: this repository is in an early stage of development and is not suitable for general use.

Usage

coming soon...

MRP Steps

  1. Create individual-level response dataset.
  2. Create poststratification dataset.
  3. Create a dataset of geographic-level predictors.
  4. Fit a regression model for an individual survey response given demographics and geographic unit.
  5. Post-stratify.