This repository refers to the paper Durante, D., Canale, A. and Rigon, T. (2018). A nested expectation-maximization algorithm for latent class models with covariates [arXiv:1705.03864v5], where we propose a novel nested EM for improved maximum likelihood estimation of latent class models with covariates. The proposed nested EM relies on a sequence of conditional expectation-maximizations which leverage the recently developed Pòlya-gamma data augmentation for logistic regression to obtain simple and exact M-steps via generalized least squares. As we discuss in the paper, differently from current algorithms for latent class models with covariates, the proposed nested EM provides a monotone log-likelihood sequence, and allows improvements in maximization performance, according to empirical studies.
The file LCA-Covariates-Algorithms.R
contains the source functions for the implementation of the proposed nested EM (and an hybrid version of the nested EM), along with additional algorithms routinely considered in the estimation of latent class models with covariates. The source functions in LCA-Covariates-Algorithms.R
require the R
libraries poLCA
, dummies
and nnet
.
As we show in Section 3 of the paper Durante, D., Canale, A. and Rigon, T. (2018). A nested expectation-maximization algorithm for latent class models with covariates [arXiv:1705.03864v5], the nested EM provides improvements in maximization performance, compared to current algorithms. The analyses in Section 3 can be reproduced using the tutorial file Election-Data-Tutorial.md
which considers the analysis of the election
dataset from the R
library poLCA
, discussed in Section 3. The file Election-Data-Tutorial.md
contains also additional analyses and quantitative assessments not discussed in the paper.