relationship between intercept "d" and IRT par "b"

1,274 views
Skip to first unread message

Manolo Romero Escobar

unread,
Jan 11, 2014, 2:46:38 PM1/11/14
to mirt-p...@googlegroups.com
Hi Phil! First, wow, mirt has come a long way from the first time you released it in cran. Congrats!
Now, the issue I am trying to address. 
I have two tests with subsets of items that in theory should have the same difficulty. 
The difficulty of these subsets increases. 
So, for example, let's say I have a test of 25 items and if you ordered them, items 1 to 5 would demand the same ability and 6 to 10 would demand the same ability and 11 to 15 would demand the same ability.. and so on, with the ability demand of each subset of five items increasing (I am trying to explore empirically if this is the case and if it is the case by how much this increase would occur). 
Ok. So now I see that ltm let me constrained parameters but I have to provide the value the parameters should be constrained to. 
Mplus goes further and allows me just to declare which items would have equal parameters, but I don't need to provide the value. 
And so does mirt!!!!!!
Cool. So far.
Now, one thing I observed fitting my models is that 
1)I can constrain Intercept and Slope (Threshold) but not Difficulty Discrimination (even though ltm calls the intercept and slope difficulty and discrimination respectively). 
2)I am able to constrain the intercept but not the difficulty. For example in mirt:

######MRE code#####
pars.1 <- mirt(data, model=1, pars=T) #to get the parameter numbers of 'd'
mod.1 <- mirt(data, model=1) #unconstrained model
#setting the constrains
const.1 <- list(pars.1$parnum[pars.1$name == 'd'][1:5],pars.1$parnum[pars.1$name == 'd'][6:10],
                  pars.1$parnum[pars.1$name == 'd'][11:15],pars.1$parnum[pars.1$name == 'd'][16:20],
                  pars.1$parnum[pars.1$name == 'd'][21:25],pars.1$parnum[pars.1$name == 'd'][26:30]
mod.2 <- mirt(data, model=1, constrain=const.1) #constrained model

coef(mod.2) #shows me that the 'd' parameters have been constrained as requested
coef(mod.2, IRTpars=T) #shows me that there are all different 'b' parameters within subsets, albeit different from coef(mod.1, IRTpars=T)

####/MRE code#####

I also found by accident that if I constrain 'a1' that 'a' is constrained.

I guess my question is more... what is the relationship between the intercept and the difficulty parameter (hence the subject of this post).
I have a second question about anova, but it deserves its own post.
Thanks,

Manolo



Phil Chalmers

unread,
Jan 11, 2014, 6:09:13 PM1/11/14
to Manolo Romero Escobar, mirt-package
Hi Manolo,

Great to hear from you :). You were one of the first who actually got
to see the package prior to the CRAN release, so I'm glad to hear that
you are liking the new features. Indeed it has come a long way.

Just so that we are working on the same code base, I rewrote your code
to work better with the current CRAN/dev version, which supports
better syntax for constraints and also created a workable dataset.

####
library(mirt)
set.seed(12345)
d <- matrix(c(rep(-2, 5), rep(-1, 5), rep(-.5, 5), rep(.5, 5), rep(1,
5), rep(2, 5)))
a <- matrix(rlnorm(30, .2, .2))
data <- simdata(a, d, N=2000, itemtype = 'dich')
head(data)

model <- mirt.model('theta = 1-30
CONSTRAIN = (1-5, d), (6-10, d), (11-15, d),
(16-20, d), (21-25, d), (26-30, d)')

mod.1 <- mirt(data, model=1) #unconstrained model
mod.2 <- mirt(data, model=model) #constrained
anova(mod.1, mod.2) #ns, models are basically equivalent (give the
same likelihood, or in better terms 'are equally likely')

coef(mod.2) #shows me that the 'd' parameters have been constrained as requested
coef(mod.2, IRTpars=T) #shows me that there are all different 'b'
parameters within subsets, albeit different from coef(mod.1,
IRTpars=T)
####

The reason that constraining 'b' versus 'd' gives different results is
that when constraining the 'd' parameters (as mirt does) has no effect
on the item slope parameter a1. In the traditional IRT metric, where
logit(P) = a(θ - b) = aθ - ab = aθ + d, you can see that if you
constrain the 'd' parameter, which is just an intercept, then the a
parameter has no effect since it is an independent term.

However, if you constrain the 'b' parameter only, 'a' continues to
have an effect in the model since 'b' is also multiplied by 'a'. In a
sense, 'a' and 'b' are correlated in parameter space in the original
IRT model, but not so in the parametrization adopted by mirt (the
so-called slope intercept form). Therefore, if you are trying to model
the items to have equal difficulties in the original IRT
parametrizations you are actually simultaneously affecting the 'a'
parameters....which might not be something you want!

The only way that the two parametrization match up is when the slopes
for those respective item blocks are also constrained to be equal.
Hope that helps.

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/groups/opt_out.

Manolo Romero Escobar

unread,
Jan 11, 2014, 6:37:08 PM1/11/14
to mirt-p...@googlegroups.com, Manolo Romero Escobar
Thanks Phil!!!! You definitely will get an acknowledgement on my dissertation :-D 
It is also now more clear why it is a1 (= a*theta_1) 
I guess equal slopes within  is a more "strict" theoretical assumption... which I have not been wanting to propose, but that would be testable. 
If I understand you well, if I try to have "b" to be equal across items of the same block I will be affecting "a1" indirectly, which is not desirable (the indirect part).
However... if I allow "d" and "a1" to be estimated as equal within block I will get the same "b" within blocks (and the same "a" also) but I will be doing so deliberately AND I can also test if this new assumption makes sense.

Now let me check your reply to my second question, that will help me understand the end product.

I really really appreciate your quick and extensive feedback!
Cheers from YHZ to YHM 



Reply all
Reply to author
Forward
0 new messages