Hostname: page-component-74656f9884-g96k6 Total loading time: 0 Render date: 2026-11-10T10:36:01.631Z Has data issue: false hasContentIssue false

Re-Evaluating Machine Learning for MRP Given the Comparable Performance of (Deep) Hierarchical Models

Published online by Cambridge University Press:  03 March 2023

MAX GOPLERUD*
Affiliation:
University of Pittsburgh, United States
*
Max Goplerud, Assistant Professor, Department of Political Science, University of Pittsburgh, United States, mgoplerud@pitt.edu.
Rights & Permissions [Opens in a new window]

Abstract

Multilevel regression and post-stratification (MRP) is a popular use of hierarchical models in political science. Multiple papers have suggested that relying on machine learning methods can provide substantially better performance than traditional approaches that use hierarchical models. However, these comparisons are often unfair to traditional techniques as they omit possibly important interactions or nonlinear effects. I show that complex (“deep”) hierarchical models that include interactions can nearly match or outperform state-of-the-art machine learning methods. Combining multiple models into an ensemble can improve performance, although deep hierarchical models are themselves given considerable weight in these ensembles. The main limitation to using deep hierarchical models is speed. This paper derives new techniques to further accelerate estimation using variational approximations. I provide software that uses weakly informative priors and can estimate nonlinear effects using splines. This allows flexible and complex hierarchical models to be fit as quickly as many comparable machine learning techniques.

Information

Type
Letter
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2023. Published by Cambridge University Press on behalf of the American Political Science Association
Figure 0

Figure 1. Comparing Prior Density for Random Effect Standard Deviation $ {\sigma}_j $Note: The dashed line shows the prior density on $ {\sigma}_j $ given an Inverse-Gamma prior on $ {\sigma}_j^2 $ with $ {\alpha}_0=1 $ and $ {\beta}_0=1/2 $. The solid line shows a Huang–Wand prior on $ {\sigma}_j^2 $ with $ \nu =2 $ and $ A=5 $ (i.e., half-t on $ {\sigma}_j $).

Figure 1

Table 1. Deep MRP Specifications

Figure 2

Figure 2. Weights Given to Models in EnsembleNote: This figure shows the ensemble weights averaged across all surveys and 10 simulations per survey. Each panel reports the sample size of the survey. Ninety-five percent confidence intervals are shown. The first four methods are from Ornstein (2020): LASSO, k-Nearest Neighbors (KNN), Random Forest (Forest), Gradient Boosting Machine (GBM). The final method is “Deep” MRP from Table 1.

Figure 3

Figure 3. Visualizing Performance: MRP versus BARTNote: Each plot compares the mean absolute error (MAE) of BART and MRP, averaged across two-hundred simulations per survey. The points below the 45-degree line indicate that MRP performs worse. The three methods shown are the traditional MRP and prediction method in Bisbee (2019) (“MRP (Bisbee 2019)”), an MRP with the same specifications but a corrected prediction (“MRP”), and a deep MRP fit using variational inference (“Deep”).

Figure 4

Table 2. Relative Mean Absolute Error versus BART

Supplementary material: Link

Goplerud Dataset

Link
Supplementary material: PDF

Goplerud supplementary material

Goplerud supplementary material

Download Goplerud supplementary material(PDF)
PDF 717.5 KB
Submit a response

Comments

No Comments have been published for this article.