Problem with using simdata with graded response model

68 views
Skip to first unread message

Varun Aggarwal

unread,
Jan 16, 2020, 4:52:41 PM1/16/20
to mirt-package

hi 

Hi guys, 

I am trying to use simdata to simulate graded response model. Here's what I am trying to do.  


a<-1

d<-c(1,0,-1)

dat1<-simdata(a=1,d=d,N=10). However, when I run this snippet of code I get a result where all the values in dat1 are 4.

 

mirt2.png



The parameters as defined in the above code work and I verified that using itemplot(shiny=T). 

MIRT figure1.png

I am not sure what is it that I am doing wrong. Any help would be appreciated. 


Thanks,
 Varun


Phil Chalmers

unread,
Jan 22, 2020, 10:19:34 PM1/22/20
to Varun Aggarwal, mirt-package
The d input here should be a matrix, not a vector, where each row corresponds to a single item. It might be helpful just to follow the examples in simdata() and modify those until it suits your need.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirt-package/d6e16f82-d5ef-443b-a915-57bf2bd8366f%40googlegroups.com.

Alexis Georgeson

unread,
May 11, 2020, 2:03:20 PM5/11/20
to mirt-package
Hi, 

I am having the same issue generating data from the graded model where all item responses are 4s. Input for d is a matrix.  I have the most recent version of mirt and have looked at the examples in simdata() and can't figure out what is happening.  Here is a reproducible example: 

 a <- matrix(rlnorm(3,.2,.3))
 b <- matrix(c(0.325,1.430,2.485,
-0.885,0.265, 0.980,
-0.630,0.270,1.320),byrow=TRUE,nrow=3)
 dat <- simdata(a=a, d=b, 1000, itemtype = 'graded')

thanks,
Alexis 



On Wednesday, January 22, 2020 at 10:19:34 PM UTC-5, Phil Chalmers wrote:
The d input here should be a matrix, not a vector, where each row corresponds to a single item. It might be helpful just to follow the examples in simdata() and modify those until it suits your need.

Phil


On Thu, Jan 16, 2020 at 4:52 PM Varun Aggarwal <varunagg...@gmail.com> wrote:

hi 

Hi guys, 

I am trying to use simdata to simulate graded response model. Here's what I am trying to do.  


a<-1

d<-c(1,0,-1)

dat1<-simdata(a=1,d=d,N=10). However, when I run this snippet of code I get a result where all the values in dat1 are 4.

 

mirt2.png



The parameters as defined in the above code work and I verified that using itemplot(shiny=T). 

MIRT figure1.png

I am not sure what is it that I am doing wrong. Any help would be appreciated. 


Thanks,
 Varun


--
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-p...@googlegroups.com.

Phil Chalmers

unread,
May 11, 2020, 3:24:10 PM5/11/20
to Alexis Georgeson, mirt-package
See the traditional2mirt() function. It looks like you are using the classical difficultly-discrimination parameterization rather than the required slope-intercept form.  

Phil

--- Sent from my mobile phone. Please excuse any tpyos

To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirt-package/b70d28ea-7cb9-49dc-b555-2dd7ac339d5a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages