Dear Phil,
I play with a two-dimensional model (Rasch item1~20 for dim1 and "nominal" item21~25 for dim2) for multilevel data. The random intercept and random slope (i.e., IQ) were ONLY considered for dim1. I simulated
~~~
people = 10000
cluster = 500
betaC = rnorm(cluster, 0 ,sqrt(1))
betaCluster = rep(betaC, each=people/cluster)
IQ = rnorm(people,0,1)
randomIntercept = rep( rnorm(cluster,0.0,sd=sqrt(0.0)) ,each=people/cluster)
t = mvtnorm::rmvnorm(n=people, mean=c(0,0), sigma=sigma)
THETA = t[,1]
THETA = THETA + randomIntercept + betaCluster*IQ
~~~
I purposely set the values of random intercept to zero. The THETA is for dim1 (Rasch model), and t[,2] is for dim2 (nominal response model). I wrote some code to simulate data (omitted here).
I run the following syntax:
~~~
load("test")
mod = mixedmirt( cbind(Data$DATA,Data$res_NRM[,,1]) , covdata=Data$covdata, model=Data$model, itemtype=c(rep('Rasch', dim(Data$DATA)[2] ) ,rep('nominal',Data$block) ),
pars=Data$sv,SE=FALSE,optimizer="nlminb", control=list(rel.tol=1e-4,eval.max=10), #SE.type="complete",
fixed=~1+IQ ,random= list(F1=~-1+IQ|group) ,internal_constraints=FALSE
,constrain = c(Data$indexThreshold,Data$intercepC)
,technical=list(gain=c(.1,1),BURNIN=100)
); est = coef(mod, printSE = TRUE, as.data.frame = TRUE)
~~~
All estimates are close to true values, except the "d1" for item 21~25. Their true value are all 0, but the estimates are all around 0.5. I suspect the syntax "random= list(F1=~-1+IQ|group)" does not work, because I tried "random= ~-1+IQ|group" and it gave the same results.
I still cannot find out the mistake I possibly made. Hope you could have a look, thank you!