mirt: Target argument

64 views
Skip to first unread message

Laurien Adriaenssens

unread,
Apr 22, 2015, 4:07:40 AM4/22/15
to mirt-p...@googlegroups.com
Hello Phil

I'm having difficulties using the Target = .. argument in the mirt function. I already tried a couple of things but get the same error report every time:

Error in validObject(.Object) : 
  invalid class “SingleGroupClass” object: invalid object for slot "Target" in class "SingleGroupClass": got class "matrix", should be or extend class "numeric"

Could you please take a look at my syntax and let me know where I've made an error? Thanks!

data <- expand.table(LSAT7)
a <- matrix(c(1,0,
              1,0,
              1,0,
              0,1,
              0,1), ncol=2, byrow=FALSE)
(mod1 <- mirt(data, 2, Target=a, rotate="targetQ"))


Phil Chalmers

unread,
Apr 22, 2015, 11:12:11 AM4/22/15
to Laurien Adriaenssens, mirt-package
Hi Laurien,

I'm afraid you've discovered some older code inputs for mirt(), which I'll be sure to remove in future versions to avoid confusion. By default the 'oblimin' rotation is used exclusively, and all other rotation arguments are passed to summary() instead. So to use the targetQ rotation, do the following:

data <- expand.table(LSAT7)
a <- matrix(c(1,0,
              1,0,
              1,0,
              0,1,
              0,1), ncol=2, byrow=FALSE)
(mod1 <- mirt(data, 2))
summary(mod1, rotate = 'targetQ', Target = a)

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

Phil Chalmers

unread,
Apr 22, 2015, 1:04:42 PM4/22/15
to Laurien Adriaenssens, mirt-package
Touched up in the dev version, and listed the change in the NEWS file. https://github.com/philchalmers/mirt/blob/master/NEWS.md. Feel free to install from Github to get the latest version. Cheers.

Phil
Reply all
Reply to author
Forward
0 new messages