## Too long for R CMD check :-(
## Not run:
# ## NUMBER OF ITEMS
# nit <- 3
#
# set.seed(2046)
# x1 <- rnorm(nit*5,0,1.7)
# zeta <- tapply(x1,rep(1:nit,each=5), function(x) round(x - mean(x),3))
#
# # lambda parameters
# x2 <- rnorm(nit*5,0,1.1)
# lam <- tapply(x2,rep(1:nit,each=5), function(x)
# {
# sort(round(x - mean(x),3),decreasing=FALSE)
# })
#
#
# # create a parlist as a first step
# ParList <- mapply(function(one,two)
# {
# x1 <- c(one,two)
# names(x1) <- paste0(rep(c("zeta","lam"),each=length(one)),1:length(one))
# return(x1)
# },one=zeta,two=lam,SIMPLIFY=FALSE)
#
#
# ## NUMBER OF RESPONDENTS
# nper <- 2000
#
#
# names(ParList) <- paste0("item",1:length(ParList))
#
# perp1 <- rnorm(nper,0,1)
# perp2 <- rnorm(nper,0.3,1)
#
# simdat1 <- NRM.sim(ParList,perp1)
# simdat2 <- NRM.sim(ParList,perp2)
#
# simdatall <- rbind(simdat1,simdat2)
# simdatallg <- data.frame(GROUP=factor(rep(c("A","B"),each=nper)),simdatall)
#
#
# my_resh <- reshMG(simdatallg,items=2:(nit+1),groups=1,correct=rep(3,nit),echo=FALSE)
#
# est1 <- nrm(my_resh)
#
#
# des2 <- designTemp(ngru=2,nit=nit,TYPE="NRM")
# des2[[1]][2,1] <- 2
#
# my_resh2 <- reshMG(simdatallg,items=2:(nit+1),groups=1,correct=rep(3,nit),echo=FALSE,design=des2)
#
# est2 <- nrm(my_resh2)
#
# ### LIKELIHOOD RATIO TEST
# lrt(est1,est2)
#
# ## End(Not run)
Run the code above in your browser using DataLab