# simulate data from latent class model with 2 classes having the same weight on 5 lists
out = simLCCR(2,5,be=0,la=c(rep(-1,5),rep(1,5)),N=200)
# simulate data from a latent class model with 2 classes, one covariate affecting the weights and
# bivariate loglinear interactions between consecutive lists
Wc = rnorm(200)
out = simLCCR(2,6,beta=c(0,1),lambda=c(-1,1,1),N=200,Wc=Wc,biv=matrix(c(1,2,3,4,2,3,4,5),4),
main="same")
# simulate data from a latent class model with 3 classes, one covariate affecting the logits of
# each response, and lag dependence
Xc = rnorm(200)
out = simLCCR(3,6,model="logit",beta=c(0,0),lambda=c(rep(-1,6),rep(0,6),rep(1,6),1,1),
N=200,Xc=Xc,flag="atleast")
# simulate data from latent class model with 2 classes and covariates affecting both class weights
# and conditional probabilities of capture configurations given the latent class
Wc = c(-1,0,1); Xc = rnorm(3)
out = simLCCR(2,5,beta=c(0,0),lambda=c(rep(-1,5),rep(1,5),1),N=c(100,100,100),Wc=Wc,Xc=Xc)
Run the code above in your browser using DataLab