counter-intuitive NRM results

44 views
Skip to first unread message

Tyler Moore

unread,
Jan 26, 2017, 4:56:59 PM1/26/17
to mirt-package

Hi Phil, I'm toying with one way to simulate NRM items without having to specify the response intercepts, and am getting some counter-intuitive results.  I was wondering if you might know why.  Here's the simulation script:

library(psych)
library(mirt)

# Simulate a 20-item test with 10000 examinees using the basic 2PL.
# All 20 items load 0.95 on a single factor, and difficulties range
# from -1.5 to 1.5.  This results in a matrix of binary responses
# (0 = incorrect; 1 = correct).

x <- sim.structure(fx=matrix(0.95,20,1),items=TRUE,cat=1,d=round(runif(20,-1.5,1.5),0),n=10000)$observed

# Now replace the incorrect responses (zeros) with random integers
# between 2 and 5.  So when examinees get an item incorrect, they
# do so by choosing some option other than 1.  Thus, the correct
# answer to every item is 1, possible response options include
# 1/2/3/4/5, and there are no distractor response options.

for (i in 1:10000) {
for (j in 1:20) {
if (x[i,j] == 0) {x[i,j] <- round(runif(1,1.50001,5.49999),0)}
}}

# Estimate the NRM using 'mirt'

mod <- mirt(x,1,itemtype="nominal")

itemplot(mod,1)

You'll notice that response option 1 (the correct response) has the opposite slope to what I was hoping - i.e. it looks like a person has to be low-ability before selecting 1.

Now if I change the script to this (where 5 is the correct response and incorrect responses are random integers between 1 and 4), it seems to work fine:

x <- sim.structure(fx=matrix(0.95,20,1),items=TRUE,cat=1,d=round(runif(20,-1.5,1.5),0),n=10000)$observed

for (i in 1:10000) {
for (j in 1:20) {
if (x[i,j] == 1) {x[i,j] <- 5}
if (x[i,j] == 0) {x[i,j] <- round(runif(1,0.5,4.49999),0)}
}}

mod <- mirt(x,1,itemtype="nominal")

itemplot(mod,1)

Any idea why results are different when all correct responses are 1?

Thanks!

Tyler

Phil Chalmers

unread,
Jan 27, 2017, 12:23:42 AM1/27/17
to Tyler Moore, mirt-package
Hi Tyler,

This post might help: http://stackoverflow.com/questions/41671318/mirt-odd-results-for-nominal-model/41753852#41753852. A similar one is somewhere on the forum archive as well. Cheers.

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages