A question about the invariance() in multigroup()

62 views
Skip to first unread message

Yingbin Zhang

unread,
Feb 19, 2018, 12:19:06 AM2/19/18
to mirt-package
Hi Phil,

I'm trying to compare factor scores between two groups via multipleGroup().
I constrained all parameters except latent means equaI across two groups with the following syntax:

  model.mnrm<-mirt.model("F1=1-8
                         F2=1-8
                         COV=F1*F2")

  multipleGroup(mse, model.mnrm, itemtype = 'gpcm', gpcm_mats = mats,
                         group = group, invariance=c('slopes', 'intercepts', 'free_means') )


However, the results shown that the covariance between factor 1 and factor 2 was not constrained equal across groups:

$Group1
.....

$means
F1 F2 
 0  0 

$cov
     F1 F2
F1  1.0 NA
F2 -0.2  1


$Group2
...

$means
   F1    F2 
1.422 0.180 

$cov
      F1 F2
F1 1.000 NA
F2 0.075  1

How can I set the covariance equal across groups?
Thank you very much.

Best,
Yingbin

Phil Chalmers

unread,
Feb 19, 2018, 8:43:43 AM2/19/18
to Yingbin Zhang, mirt-package
It might seem a little odd, but the group-level parameters as stored as the (J + 1)th item internally. So in your case with the mirt.model syntax you can specify constraints with the index of 9. Here's and example with J = 15 items:

set.seed(12345)
a <- matrix(abs(rnorm(15,1,.3)), ncol=1)
d <- matrix(rnorm(15,0,.7),ncol=1)
itemtype <- rep('2PL', nrow(a))
N <- 1000
dataset1 <- simdata(a, d, N, itemtype)
dataset2 <- simdata(a, d, N, itemtype, mu = .1, sigma = matrix(1.5))
dat <- rbind(dataset1, dataset2)
group <- c(rep('D1', N), rep('D2', N))

model <-  model.mnrm<-mirt.model("F1=1-15
                         F2=1-15
                         COV=F1*F2
CONSTRAINB = (16, COV_21")
mod_configural <- multipleGroup(dat, model, group = group) #completely separate analyses
coef(mod_configural, simplify=TRUE)

If you didn't know that COV_21 was the correct parameter, check the starting value names first by passing multipleGroup(..., pars = 'values'). HTH.

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yingbin Zhang

unread,
Feb 19, 2018, 10:53:22 PM2/19/18
to mirt-package
Thank you very much. The "CONSTRAINB" works.

Best,
Yingbin


在 2018年2月19日星期一 UTC+8下午9:43:43,Phil Chalmers写道:

Phil

To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages