简体   繁体   中英

Latent Class as Dependant Variable

I am trying to figure out how to use the latent classes , generated by a LCA modelling, as dependent variable in a regression.

The software documentation of poLCA (and others) seems only to show how to use the latent classes as independent variables, such as in this example, how PARTY and AGE explains the class membership.

However, I am interested in doing the opposite, for instance to understand how the membership of a class affects y (let's say PARTY, as an example).

library(poLCA)
data("election")

f.party <- cbind(MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, 
KNOWB, LEADB, DISHONB, INTELB) ~ PARTY + AGE

# run the LCA estimation #
nes.party <- poLCA(f.party, election, nclass = 3, verbose = FALSE)

I understand that the class membership can be retrieve with

nes.party$predclass

and that the posterior proba can be retrieve with

nes.party$posterior

However, I don't know how to use this info in an OLS let's say.

Doing

lm(PARTY ~ predclass, election)

would be wrong, because I want to account for the class probability membership.

How would you do it?

I came across this question while doing a related search, hence the late reply.

The latent class is a multinomial (ie unordered category) outcome, so the parallel you want isn't linear regression - it's multinomial regression. In fact, you could predict each person's most likely latent class, then enter it into a multinomial regression model. That would be a wrong approach, though, as it wouldn't account for the fact that the latent class is estimated with uncertainty.

I've heard the term latent class regression used to describe when you're trying to see if predictors have any relation to class membership without being used as indicator variables themselves. And in fact, poLCA does seem to allow this. See page 3 of the manual .

## Example 2. Two-class latent class regression using
## GPA as a covariate to predict class membership as
## "cheaters" vs. "non-cheaters".
## (Table 7.1, p. 85, and Figure 7.1, p. 86)
##
f2 <- cbind(LIEEXAM,LIEPAPER,FRAUD,COPYEXAM)~GPA
ch2c <- poLCA(f2,cheating,nclass=2) # log-likelihood: -429.6384
GPAmat <- cbind(1,c(1:5))
exb <- exp(GPAmat %*% ch2c$coeff)
matplot(c(1:5),cbind(1/(1+exb),exb/(1+exb)),type="l",lwd=2,
main="GPA as a predictor of persistent cheating",
xlab="GPA category, low to high",
ylab="Probability of latent class membership")

Copy-pasted their example. Here, they are using GPA to predict membership in two latent classes, defined by 4 indicators describing propensity to cheat.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM