Fixing the Item parameters

460 views
Skip to first unread message

Irshad Mujawar

unread,
Sep 16, 2014, 1:04:54 AM9/16/14
to mirt-p...@googlegroups.com
Hello everyone,

I need to fix the parameters for the previously calibrated items. But it seems I am missing some thing here.

What I have tried so far:


> data(LSAT7)
> LSAT7=expand.table(LSAT7)
> fitted_model <- mirt(LSAT7[,1:3], 1, 'Rasch', pars='values')
> fitted_model
   
group   item     class   name parnum     value lbound ubound   est prior.type prior_1 prior_2
1    all Item.1      dich     a1      1 1.0000000   -Inf    Inf FALSE       none     NaN     NaN
2    all Item.1      dich      d      2 1.8597467   -Inf    Inf  TRUE       none     NaN     NaN
3    all Item.1      dich      g      3 0.0000000   -Inf    Inf FALSE       none     NaN     NaN
4    all Item.1      dich      u      4 1.0000000   -Inf    Inf FALSE       none     NaN     NaN
5    all Item.2      dich     a1      5 1.0000000   -Inf    Inf FALSE       none     NaN     NaN
6    all Item.2      dich      d      6 0.7998986   -Inf    Inf  TRUE       none     NaN     NaN
7    all Item.2      dich      g      7 0.0000000   -Inf    Inf FALSE       none     NaN     NaN
8    all Item.2      dich      u      8 1.0000000   -Inf    Inf FALSE       none     NaN     NaN
9    all Item.3      dich     a1      9 1.0000000   -Inf    Inf FALSE       none     NaN     NaN
10   all Item.3      dich      d     10 1.4650322   -Inf    Inf  TRUE       none     NaN     NaN
11   all Item.3      dich      g     11 0.0000000   -Inf    Inf FALSE       none     NaN     NaN
12   all Item.3      dich      u     12 1.0000000   -Inf    Inf FALSE       none     NaN     NaN
13   all  GROUP GroupPars MEAN_1     13 0.0000000   -Inf    Inf FALSE       none     NaN     NaN
14   all  GROUP GroupPars COV_11     14 1.0000000  1e-04    Inf  TRUE       none     NaN     NaN

What I understood from the description is that these values are which you are looking at in the above table are the initial values of the item parameters.


 fitted_model <- mirt(LSAT7[,1:3], 1, 'Rasch')
Iteration: 83, Log-Lik: -1594.718, Max-Change: 0.00010
 
> coef(fitted_model)
$Item
.1
    a1     d g u
par  
1 1.973 0 1


$Item
.2
    a1     d g u
par  
1 0.839 0 1


$Item
.3
    a1     d g u
par  
1 1.545 0 1


$GroupPars
    MEAN_1 COV_11
par      
0  1.436



My aim: To fix the item parameters of these 3 item fixed when I am estimating the parameters to the new items.

Now I want to fix these difficulty parameters as 1.973, 0.839 and 1.545 for first, second and third item fixed respectively and estimate the item parameters for fourth and fifth item.


How can I do this?

Regards,
Irshad



Irshad Mujawar

unread,
Sep 16, 2014, 1:19:37 AM9/16/14
to mirt-p...@googlegroups.com
please suggest  methods other than editing through GUI; because that GUI editing window wont open unless you use pars='values'. May be more like passing a parameter matrix or an array.

Phil Chalmers

unread,
Sep 16, 2014, 9:26:25 AM9/16/14
to Irshad Mujawar, mirt-package
Editing through the GUI? I'm not sure what that means, R is console based (I assume you mean with RStudio or some other IDE?). 

In the data.frame object returned from the pars = 'values' input, just set the values to what you want using the $ operator, and set the 'sv$est' values to FALSE to indicate that they are not to be estimated. Then just pass this object back to the estimation function to replace the starting values.

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.

Douglas De Rizzo Meneghetti

unread,
Sep 20, 2016, 3:08:43 PM9/20/16
to mirt-package, irshadmuj...@gmail.com
I am trying to do something similar. I have a data.frame like the one above, in which I set the cv$est values of the difficulty parameter of some items to FALSE but, after I run mirt, these difficulty parameters are changed. See the example below, in which I fix the parameters of 3 items but, when I use coef to extract the parameters after the estimation, everything is different.

library(mirt)

myData
= read.delim("~/data.txt", header = FALSE)
pattern
= mirt(myData, 1, itemtype = '3PL', pars = 'values')

pattern
[1 * 4 + 1, 'value'] = 1.26
pattern
[1 * 4 + 2, 'value'] = -2.39
pattern
[1 * 4 + 3, 'value'] = 0.189
pattern
[1 * 4 + 1, 'est'] = FALSE
pattern
[1 * 4 + 2, 'est'] = FALSE
pattern
[1 * 4 + 3, 'est'] = FALSE
pattern
[5 * 4 + 1, 'value'] = 1.78
pattern
[5 * 4 + 2, 'value'] = -1.86
pattern
[5 * 4 + 3, 'value'] = 0.104
pattern
[5 * 4 + 1, 'est'] = FALSE
pattern
[5 * 4 + 2, 'est'] = FALSE
pattern
[5 * 4 + 3, 'est'] = FALSE
pattern
[14 * 4 + 1, 'value'] = 0.585
pattern
[14 * 4 + 2, 'value'] = -2.503
pattern
[14 * 4 + 3, 'value'] = 0.108
pattern
[14 * 4 + 1, 'est'] = FALSE
pattern
[14 * 4 + 2, 'est'] = FALSE
pattern
[14 * 4 + 3, 'est'] = FALSE

myObj
= mirt(myData, 1, pars = pattern)
coefs
= coef(myObj, simplify=TRUE, IRTpars=TRUE)

Phil Chalmers

unread,
Sep 20, 2016, 3:18:25 PM9/20/16
to Douglas De Rizzo Meneghetti, mirt-package, Irshad Mujawar
Remove the IRTpars = TRUE part if coef(). You'll see that the correct terms are being estimated (the difficulty parameter is not fixed though, because it is computed as b = -d/a, and a is freely estimated).

Phil

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