On 26.03.2013 15:10, Bismark Kofi wrote:
Please can someone explain to me how to use randomLCA in R for an analysis.
I tried using it and had this error (copied below) which indicated my
patterns must consist of 0 or 1. I assume I am doing something wrong.

Yes, not using 0 and 1?
See the help page which explains:

patterns    Matrix of 0 and 1 definging the outcome patterns

Best,
Uwe Ligges


Please help.



library(lattice)
library(boot)

Attaching package: ‘boot’

The following object(s) are masked from ‘package:lattice’:

     melanoma

library(utils)
library(randomLCA)
#random parameter latent class model
trt.lca1random <-
randomLCA(trt[,1:5],initmodel=0,nclass=1,random=TRUE,quadpoints=41,probit=TRUE)
Error in randomLCA(trt[, 1:5], initmodel = 0, nclass = 1, random = TRUE,  :
   patterns must consist of either 0 or 1
trt.lca2random <-
randomLCA(trt[,1:5],initmodel=0,nclass=2,random=TRUE,quadpoints=41,probit=TRUE)
Error in randomLCA(trt[, 1:5], initmodel = 0, nclass = 2, random = TRUE,  :
   patterns must consist of either 0 or 1

Thanks,
Bismark

        [[alternative HTML version deleted]]



______________________________________________
R-help@r-project.org mailing list
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.


______________________________________________
R-help@r-project.org mailing list
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