I wrote two R packages. One is based on an article in Political Analysis explaining how strategic models can incorporate selection models and provide unbiased estimates. The second package was written for a class I teach where I wanted to rely on MrP estimates.
- StratSel: This R-package implements an estimator which explicitly models a strategic interaction based on quantal response equilibria. What distinguishes this estimator from standard QRE estimators (as found in the R package Games) is that it is not prone to selection bias even if the unobserved components are correlated. The package contains functions to estimate a SSM (strategic selection model), generate predictions, plot predictions, and export results to LaTeX. In addition, the package contains a function to create dyadic data sets.
- swissMrP: This package implements a number of functions to create small area predictions based on Swiss survey data. The main purpose of the package is to facilitate the use of MrP (multilevel regression with post-stratification) in a class I taught in 2013 (and 2014, 2015, 2016, 2017, 2018) at the University of Zurich. The package allows to generate MrP estimates, to plot them, and to draw maps showing the geographic variation in opinions.
You can install the package from GitHub: