lca_entropy: Stata command for entropy fit statistic for latent class analysis

(1) Introduction

lca_entropy is a Stata command that calculates an entropy fit statistic for a latent class analysis (LCA) model. The LCA model should be fit using gsem in Stata.


To read more about Latent Class Analysis and using entropy as a measure of model fit see:

(2) Installation Instructions 

To install in Stata:

    net install lca_entropy, from("https://tdmize.github.io/data/lca_entropy")

Once installed, to read the help file (also available here):

    help lca_entropy

(3) Examples

Load data and do some data management to recreate example from Alderson et al. 2007:

use "https://tdmize.github.io/data/data/cda_gss", clear


keep if year == 1998 | year == 2002


drop if missing(opera, dance, drama, visitart, popmusic, readfict, seemovie)

Fit the LCA using gsem:

gsem (-> opera dance drama visitart popmusic readfict seemovie, logit) ///

(1: opera <- _cons@-15) ///

, lclass(Class 3)

Estimate entropy using lca_entropy:

lca_entropy


Entropy =  0.607