How to identify anchor items in DIF analyses?

830 views
Skip to first unread message

Andrea Bizarro

unread,
Mar 24, 2016, 11:56:32 AM3/24/16
to mirt-package
Hello, 

I am trying to specify anchor items and cannot figure out how to add this into my DIF code. Apologies if this is a simple answer, I expected there to be many more questions like this and there aren't so I may be missing something obvious. I've walked through all the DIF examples I can find and am stuck. Either I get this code to run and get a hyper-parameter error like this: 

> BDRMod<-multipleGroup(BDR0913,1,BDRgroup,SE=T)
Iteration: 286, Log-Lik: -32784.473, Max-Change: 0.00010

Calculating information matrix...
> BDRResult<-DIF(BDRMod,c('a1','d'),plotdif=T)
No hyper-parameters were estimated in the DIF model. For effective
                DIF testing, freeing the focal group hyper-parameters is recommended.
There were 15 warnings (use warnings() to see them)

...which I'm guessing the errors happen because I haven't identified anchor items? 

Or when I try to specify this model to use 1-3 as anchor items like the example I found online:

> BDRmodel<-'F=1-20 CONSTRAINB= (1-3, a1), (1-3, d)' 

I get the following error: 

> BDRMod<-multipleGroup(BDR0913,BDRmodel,BDRgroup,SE=T)
Error in tmp2[1L]:tmp2[2L] : NA/NaN argument
In addition: Warning messages:
1: In model.elements(model = model, itemtype = itemtype, factorNames = factorNames,  :
  NAs introduced by coercion
2: In model.elements(model = model, itemtype = itemtype, factorNames = factorNames,  :
  NAs introduced by coercion


I would greatly appreciate some guidance on how to identify my anchor items! 

Thanks in advance.

Phil Chalmers

unread,
Mar 24, 2016, 11:59:17 AM3/24/16
to Andrea Bizarro, mirt-package
On Thu, Mar 24, 2016 at 11:56 AM, Andrea Bizarro <andrea....@gmail.com> wrote:
Hello, 

I am trying to specify anchor items and cannot figure out how to add this into my DIF code. Apologies if this is a simple answer, I expected there to be many more questions like this and there aren't so I may be missing something obvious. I've walked through all the DIF examples I can find and am stuck. Either I get this code to run and get a hyper-parameter error like this: 

> BDRMod<-multipleGroup(BDR0913,1,BDRgroup,SE=T)
Iteration: 286, Log-Lik: -32784.473, Max-Change: 0.00010

Calculating information matrix...
> BDRResult<-DIF(BDRMod,c('a1','d'),plotdif=T)
No hyper-parameters were estimated in the DIF model. For effective
                DIF testing, freeing the focal group hyper-parameters is recommended.
There were 15 warnings (use warnings() to see them)

...which I'm guessing the errors happen because I haven't identified anchor items? 

Or when I try to specify this model to use 1-3 as anchor items like the example I found online:

> BDRmodel<-'F=1-20 CONSTRAINB= (1-3, a1), (1-3, d)' 

This looks correct, but is there a space between the arguments? I.e., does it look like

BDRmodel<-'F=1-20 
                     CONSTRAINB= (1-3, a1), (1-3, d)' 

in your script file?
 

I get the following error: 

> BDRMod<-multipleGroup(BDR0913,BDRmodel,BDRgroup,SE=T)
Error in tmp2[1L]:tmp2[2L] : NA/NaN argument
In addition: Warning messages:
1: In model.elements(model = model, itemtype = itemtype, factorNames = factorNames,  :
  NAs introduced by coercion
2: In model.elements(model = model, itemtype = itemtype, factorNames = factorNames,  :
  NAs introduced by coercion


I would greatly appreciate some guidance on how to identify my anchor items! 

Thanks in advance.

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

Jeanne Sinclair

unread,
Jun 25, 2018, 3:13:32 PM6/25/18
to mirt-package
Hi again Phil, 

I'm posting here on a previous question to hopefully avoid redundancy; hope that's ok. I am having trouble choosing anchor items. Is this a feasible way to identify them? 

model_constrained <- multipleGroup(items, 1, group1,
                                   invariance = c(colnames(items), 'free_means', 'free_var'))
dropdown <- DIF(model_constrained, 'd', scheme = 'drop')
dropdown

I guess among other things I am confused if the "invariance=" phrase constrains slopes and intercepts as written here, or if they have to be written specifically as 'slopes', 'intercepts'.


Thanks,
Jeanne

Phil Chalmers

unread,
Jun 26, 2018, 12:31:25 PM6/26/18
to Jeanne Sinclair, mirt-package

On Mon, Jun 25, 2018 at 3:13 PM Jeanne Sinclair <jeanneh...@gmail.com> wrote:
Hi again Phil, 

I'm posting here on a previous question to hopefully avoid redundancy; hope that's ok. I am having trouble choosing anchor items. Is this a feasible way to identify them? 

Not really, they have to be selected based on prior theory. There has been some work to 'empirically' identify good anchors based on different algorithmic strategies, but in all cases I would still prefer theoretical selection of anchor items as the most justifiable approach (the algorithmic approaches could be used to support their selection, however). Carl Woods and others have done some work in this area recently.
 

model_constrained <- multipleGroup(items, 1, group1,
                                   invariance = c(colnames(items), 'free_means', 'free_var'))
dropdown <- DIF(model_constrained, 'd', scheme = 'drop')
dropdown

I guess among other things I am confused if the "invariance=" phrase constrains slopes and intercepts as written here, or if they have to be written specifically as 'slopes', 'intercepts'.

It depends on the model, as not all IRT models have a slope-intercept form. The above just identifies all items as invariant, regardless of their class/parameters, and so constraints all items to be anchors by default. Might be a good starting location to work from if you aren't sure about anchors or you're pretty sure there's no systematic DIF in one direction in the test (if the DIF effects favour one group over the other in a somewhat random pattern then this strategy can be quite effective). HTH.

Phil
Reply all
Reply to author
Forward
0 new messages