# Model with only dichotomous manifest variables
data(values)
f1 <- cbind(A,B,C,D)~1
M1 <- poLCA(f1,values,nclass=2,verbose=FALSE)
plot(M1)
# Model with polytomous manifest variables
data(gss82)
f2 <- cbind(PURPOSE,ACCURACY,UNDERSTA,COOPERAT)~1
M2 <- poLCA(f2,gss82,nclass=3,maxiter=2000)
plot(M2)
Run the code above in your browser using DataLab