Does "random=list(F1=~...)" work in mixedmirt for multidimensional model?

41 views
Skip to first unread message

Keith Lau

unread,
Jun 30, 2016, 12:12:28 AM6/30/16
to mirt-package

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!
test

Phil Chalmers

unread,
Jul 3, 2016, 10:02:41 AM7/3/16
to Keith Lau, mirt-package
It seems to be related to the nominal itemtype not being well supported by mixedmirt. I'll look into why. Nevertheless, do you need the NRM here? Usually its an exploratory model and shouldn't be used for confirmatory-type analyses like this. Cheers. 

Phil

--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages