I was trying to get DIF impact measures using empirical_ES() after an anchored run. Specifying focal_items, however, fails.
Attached is a reproducible example building upon the example on the help page. mirt_bugIssue_ex.txt
Looking at the code, I think the following need to change:
lines 198 & 199 - change to extract.item(..., focal_item[i])
line 245 - remove the row references; change it to return(df.item.output)
Lines 198 & 199 are the biggest issues, though, because they affect both the item table that gets returned, and the plots. When item subsets get plotted, it is plotting the first n items, even though they get the item labels for the focal_items. As shown in the code, the plots give 4 items, none of which exhibit DIF, but when not requesting focal_items, all 4 of them exhibit DIF and have different plots.
I was trying to get DIF impact measures using
empirical_ES()
after an anchored run. Specifying focal_items, however, fails.Attached is a reproducible example building upon the example on the help page. mirt_bugIssue_ex.txt
Looking at the code, I think the following need to change: lines 198 & 199 - change to
extract.item(..., focal_item[i])
line 245 - remove the row references; change it toreturn(df.item.output)
Lines 198 & 199 are the biggest issues, though, because they affect both the item table that gets returned, and the plots. When item subsets get plotted, it is plotting the first n items, even though they get the item labels for the focal_items. As shown in the code, the plots give 4 items, none of which exhibit DIF, but when not requesting focal_items, all 4 of them exhibit DIF and have different plots.