Dear Scott,

I think the issue here is you need to 
form a correct formula poLCA::poLCA can 
accept.

The help page ?poLCA::election has this 
example:

        # Latent class models with one (loglinear independence) to three classes
        data(election)
        f <- cbind(MORALG,CARESG,KNOWG,LEADG,DISHONG,INTELG,
                   MORALB,CARESB,KNOWB,LEADB,DISHONB,INTELB)~1
        nes1 <- poLCA(f,election,nclass=1)  # log-likelihood: -18647.31
        nes2 <- poLCA(f,election,nclass=2)  # log-likelihood: -17344.92
        nes3 <- poLCA(f,election,nclass=3)  # log-likelihood: -16714.66

Perhaps if you export df first using 
data() and try to use cbind(x1, x2)~1 as 
the formula ... 

        data(df2)
        f <- cbind(x1, x2)~1
        poLCA(f, df2, nclass=2, maxiter=100, nrep=10, verbose =TRUE)

Best,
Rasmus

Attachment: signature.asc
Description: PGP signature

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to