i have a (maybe more general) question regarding the parametrization of the gpcm-model in mirt.
so far, when i used ltm to estimate my models, the gpcm-parameters were the points on the theta-scale were the probability functions of two adjacent categories met.
how can i transform the gpcm-parameters given by mirt into these?
see below an example with the science-data
library(ltm)
library(mirt)
dat = sapply(Science, as.numeric)[, c(-2,-5:-6)]
ltm_model = gpcm(dat)
mirt_model = mirt(dat, model = 1, itemtype="gpcm")
coef(ltm_model)
coef(mirt_model)
plot(ltm_model, item = 1)
abline(v = coef(ltm_model)[1,1:3]) # the threshold-params as vertical lines
thanks a lot!
Thanks a lot! Best, Felix
i used the code mentioned above to write two functions to transform the GPCM-parameters and i would like to ask, if you could check the numbers, since the params are somewhat different to what coef(..., IRTpars = TRUE) reports.
Initially, i have the following parameters from a unidimensional GPCM:
slope step1 step2 step3 step4
2.35 0.41 1.27 2.13 3.02
i convert them using my function (see below) and get that:
a1 d0 d1 d2 d3 d4
2.35 0 -0.964 -3.948 -8.954 -16.05
I take those parameters to fix a model and estimate fscores. This seems to work flawlessly, the results make sense. however, using coef(..., IRTpars = TRUE) gives me some parameters, which are different from the ones i putted in the model.
a b1 b2 b3 b4 b5
par 2.35 0 0.836 2.531 5.087 8.532
Is this kind of a different parametrization than my first one (because there is b1 = 0)? Do the values make sense?
Thanks a lot!
Felix
If necessary, here are the functions i used for transformation:
transform_mirt_to_thresholds = function(slope, ds)
{
ltmds <- c(slope, -diff(ds/slope))
names(ltmds) = c("slope", paste0("threshold", 1:(length(ds)-1)))
return(ltmds)
}
transform_thresholds_to_mirt = function(slope, thresholds)
{
back = c(0, -thresholds)
for (i in 3:length(back)) back[i] = back[i-1] + back[i]
back = c(slope, back*slope)
names(back) = c("a1", paste0("d", 0:(length(back)-2)))
return(back)
}
}
--
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.
library(ltm)
library(mirt)
dat = sapply(Science, as.numeric)[, c(-2,-5:-6)]
ltm_model = gpcm(dat)
mirt_model = mirt(dat, model = 1, itemtype="gpcm")
coef(ltm_model)
coef(mirt_model)
coef(mirt_model, IRTpars = TRUE)
plot(fscores(mirt_model)[, "F1"],factor.scores(ltm_model,method="EAP")$score.dat$z1)