Does mirt allow discrete item parameter?

49 views
Skip to first unread message

Keith Lau

unread,
Jun 6, 2016, 8:49:21 AM6/6/16
to mirt-p...@googlegroups.com
For example, a parameter only has values of 0 or 1.

Phil Chalmers

unread,
Jun 6, 2016, 1:35:09 PM6/6/16
to Keith Lau, mirt-package
Yes. See the mdirt() function (and the more updated version with SE computations on the dev). Cheers.

Phil

On Mon, Jun 6, 2016 at 8:49 AM, Keith Lau <genw...@gmail.com> wrote:
As title.  Thanks.

--
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.

Keith Lau

unread,
Jun 6, 2016, 7:15:22 PM6/6/16
to mirt-p...@googlegroups.com
Hi Phil,

Can I do multiple group analysis with mdirt? DIF is also the interest. Thanks.

Phil Chalmers

unread,
Jun 6, 2016, 7:17:06 PM6/6/16
to Keith Lau, mirt-package
Probably? I've not tested it. In any event, you'll need the dev version to do that in order to constrain the latent variable multinomial coefficients (used to generate class membership). 

Phil

On Mon, Jun 6, 2016 at 7:15 PM, Keith Lau <genw...@gmail.com> wrote:
Hi Phil,

Can I do multiple group analysis with mdirt? DIF is the interest. Thanks.

Keith Lau

unread,
Jun 6, 2016, 7:48:39 PM6/6/16
to mirt-package, genw...@gmail.com
Hi Phil,

Is it a bug?

dat <- expand.table(LSAT6)
QQ <- matrix(1, nrow= dim(dat)[2] , ncol=2, dimnames = list(NULL, c('THETA', 'GAMMA')))
QQ[1:2,2] = 0; QQ[3:5,1] = 0
COV <- matrix(c(FALSE, TRUE, TRUE, FALSE), 2)
model <- mirt.model(QQ, COV=COV)
mod2 <- mdirt(dat, model)

Error: is.numeric(model) is not TRUE

Phil Chalmers於 2016年6月7日星期二 UTC+8上午7時17分06秒寫道:

Keith Lau

unread,
Jun 6, 2016, 7:55:59 PM6/6/16
to mirt-package, genw...@gmail.com
Hi Phil,

If I understand correctly, the mdirt only allows discrete latent factor, but not the discrete item parameter?

Phil Chalmers於 2016年6月7日星期二 UTC+8上午1時35分09秒寫道:

Phil Chalmers

unread,
Jun 6, 2016, 7:57:57 PM6/6/16
to Keith Lau, mirt-package
Perhaps I miss understood then. Could you clarify what you mean by discrete parameter? Preferably with an equation.

Phil

Keith Lau

unread,
Jun 6, 2016, 8:03:40 PM6/6/16
to mirt-package, genw...@gmail.com
I would like to decompose DIF effect into a mixture model:

dif ~ (1-g)*N(0,.001) + g*N(0, 100)

where g is the discrete parameter (0 or 1).

Phil Chalmers於 2016年6月7日星期二 UTC+8上午7時57分57秒寫道:

Phil Chalmers

unread,
Jun 6, 2016, 8:06:11 PM6/6/16
to Keith Lau, mirt-package
That's not natively supported, but it's probably possible with the new createGroup() function. Maybe try formulating it there first (I'd recommend using logit parameters during estimation instead of the raw probability values). HTH.

Phil

Keith Lau

unread,
Jun 7, 2016, 12:17:19 AM6/7/16
to mirt-package, genw...@gmail.com
createGroup() seems designed for population level, but not for item level. I haven't figured out how to do yet.

Using Bernoulli prior distribution for the discrete parameter may be an alternative way? But seems not allowed in mirt yet.

Phil Chalmers於 2016年6月7日星期二 UTC+8上午8時06分11秒寫道:

Phil Chalmers

unread,
Jun 7, 2016, 1:51:29 AM6/7/16
to Keith Lau, mirt-package
Hmm, I'm not sure this has to do with problems with priors. It may be possible to define custom itemtypes to accomplish such a task (with constraints). But for the general setup, I'd have to think more about it.

Phil
Reply all
Reply to author
Forward
0 new messages