Hostname: page-component-74656f9884-qr5l4 Total loading time: 0 Render date: 2026-11-04T12:53:58.006Z Has data issue: false hasContentIssue false

Modeling Context-Dependent Latent Effect Heterogeneity

Published online by Cambridge University Press:  20 May 2019

Diogo Ferrari*
Affiliation:
Department of Political Science, University of Michigan, 505 South State Street, 5700 Haven Hall, Ann Arbor, MI 48104, USA. Email: diogoferrari@gmail.com
Rights & Permissions [Opens in a new window]

Abstract

Classical generalized linear models assume that marginal effects are homogeneous in the population given the observed covariates. Researchers can never be sure a priori if that assumption is adequate. Recent literature in statistics and political science have proposed models that use Dirichlet process priors to deal with the possibility of latent heterogeneity in the covariate effects. In this paper, we extend and generalize those approaches and propose a hierarchical Dirichlet process of generalized linear models in which the latent heterogeneity can depend on context-level features. Such a model is important in comparative analyses when the data comes from different countries and the latent heterogeneity can be a function of country-level features. We provide a Gibbs sampler for the general model, a special Gibbs sampler for gaussian outcome variables, and a Hamiltonian Monte Carlo within Gibbs to handle discrete outcome variables. We demonstrate the importance of accounting for latent heterogeneity with a Monte Carlo exercise and with two applications that replicate recent scholarly work. We show how Simpson’s paradox can emerge in the empirical analysis if latent heterogeneity is ignored and how the proposed model can be used to estimate heterogeneity in the effect of covariates.

Information

Type
Articles
Copyright
Copyright © The Author(s) 2019. Published by Cambridge University Press on behalf of the Society for Political Methodology. 
Figure 0

Table 1. Relationship between GLM, GLMM, FMM and hdpGLM based on structural assumptions on $\unicode[STIX]{x1D705},Z_{i}$ and $\unicode[STIX]{x1D711}_{i}$.

Figure 1

Table 2. Comparing estimates of GLM (estimated using MLE) and hdpGLM (estimated using MCMC) with and without latent heterogeneity in the population.

Figure 2

Figure 1. Comparing marginal effect estimated using GLM (MLE estimator) and hdpGLM (MCMC posterior average) when there are 3 clusters in the population.

Figure 3

Table 3. Summary of the performance of the hdpGLM when estimating number of clusters (K) and linear coefficients ($\unicode[STIX]{x1D6FD}$) across 100 replications generated by 10 different parameter sets.

Figure 4

Figure 2. Output of estimation of hdpGLM model for a data set with 10 contexts and positive effect of context-level feature $W_{1}$ on the marginal effect $\unicode[STIX]{x1D6FD}_{1}$ of $X_{1}$.

Figure 5

Figure 3. Comparing performance of hdpGLM and GLM using root-mean-squared error (RMSE) as a function of the number of clusters in the data.

Figure 6

Figure 4. Left panel shows the effect of altruism, cosmopolitanism, and income on support for bailout estimated by GLM, reproducing Table 3 of Bechtel, Hainmueller, and Margalit (2014). Right panel shows latent heterogeneity in the marginal effect of very high cosmopolitanism as function of German states.

Figure 7

Table 4. GLM vs hdpGLM estimates for counties with no latent heterogeneity.

Figure 8

Figure 5. Posterior distribution of income effect for 20 selected counties (left panel), posterior expectation of income effect in each cluster as function of inequality (top-right panel), and posterior distribution of the effect of inequality on the income effect (bottom right).

Supplementary material: File

Ferrari supplementary material

Ferrari supplementary material 1

Download Ferrari supplementary material(File)
File 10.7 MB