# NOT RUN {
set.seed(123456)
N <- 3000
Q <- sim10GDINA$simQ
gs <- matrix(c(0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2,
0.1,0.2),ncol = 2, byrow = TRUE)
# By default, individuals are simulated from uniform distribution
# and deltas are simulated randomly
sim1 <- simGDINA(N,Q,gs.parm = gs,model="DINA")
sim2 <- simGDINA(N,Q,gs.parm = gs,model=c(rep("DINA",9),"DINO"))
dat <- rbind(extract(sim1,"dat"),extract(sim2,"dat"))
gr <- c(rep(1,N),rep(2,N))
dif.out <- dif(dat,Q,group=gr)
dif.out2 <- dif(dat,Q,group=gr,method="LR")
# }
Run the code above in your browser using DataLab