Ran successful models - all of a sudden am getting an error - is there a bug in multipleGroups?

468 views
Skip to first unread message

Andrea Bizarro

unread,
Mar 24, 2016, 4:07:00 PM3/24/16
to mirt-package
I posted earlier about struggling with anchor items... I successfully performed several DIF analyses but am now stuck using the same syntax and type of data, I'm not sure where I went wrong. 



> BModel13P<- mirt(BL13P,1,itemtype="graded",method="EM",quadpts=81,verbose=T,technical=list(NCYCLES=1000,removeEmptyRows=T))
Iteration: 175, Log-Lik: -15159.833, Max-Change: 0.00010
> BLR09Pfs<-fscores(BModel09P)
> PLR09Pfs<-fscores(PModel09P)
> BLR13Pfs<-fscores(BModel13P)
> BLR09Pfull<-imputeMissing(BModel09P,BLR09Pfs)
> PLR09Pfull<-imputeMissing(PModel09P,PLR09Pfs)
> BLR13Pfull<-imputeMissing(BModel13P,BLR13Pfs)
> BN1P<-nrows(BLR09Pfull)
Error: could not find function "nrows"
> BN1P<-nrow(BLR09Pfull)
> BN2P<-nrow(BLR13Pfull)
> BPgroup<-c(rep('2009', BN1P), rep('2013',BN2P))
> BP0913<-rbind(BLR09Pfull, BLR13Pfull)
> itemnames<-colnames(BP0913)
> itemnames
 [1] "q1"  "q2"  "q3"  "q4"  "q5"  "q6"  "q7"  "q8"  "q9"  "q10" "q11" "q12" "q13" "q14" "q15" "q16"
[17] "q17" "q18" "q19" "q20"
> BPMod<-multipleGroup(BP0913,1,BPgroup, SE=T,
+                        invariance=c('free_var', 'free_means', 'q1:q20'))
Error: Multiple Group model will not be identified without proper constraints
                    (groups contain missing data patterns where item responses have been completely ommited)
In addition: Warning message:
Multiple-group model may not be identified without providing anchor items 

I've triple checked that there is no missing data in these and that the row numbers for the group line up with the dataset row counts. I used the exact same group labels in another model that ran successfully. What could be going wrong here? 

Thank you!! 

Phil Chalmers

unread,
Mar 25, 2016, 3:37:52 PM3/25/16
to Andrea Bizarro, mirt-package
 'q1:q20' doesn't look to be an item. You probably want to use itemnames[1:20] instead.

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.

Andrea Bizarro

unread,
Mar 25, 2016, 3:52:39 PM3/25/16
to Phil Chalmers, mirt-package
q1:q20 are item names that I identified in R and this worked in a previous model. I can't understand why this one is telling me "groups contain missing data patterns where item responses have been completely omitted" when I did the imputeMissing command and even took the combined datasets and used the na.omit command to eliminate any missing data. 

Would it really be the item names causing this error or is there something funky going on with the data?
--
Andrea M. Bizarro, M.A. 

PhD Candidate
Industrial/Organizational Psychology
Department of Psychology Unit 1020
University of Connecticut
Storrs, CT 06269

Phil Chalmers

unread,
Mar 25, 2016, 3:55:26 PM3/25/16
to Andrea Bizarro, mirt-package


On Mar 25, 2016 3:52 PM, "Andrea Bizarro" <andrea....@gmail.com> wrote:
>
> q1:q20 are item names that I identified in R and this worked in a previous model. I can't understand why this one is telling me "groups contain missing data patterns where item responses have been completely omitted" when I did the imputeMissing command and even took the combined datasets and used the na.omit command to eliminate any missing data. 
>
> Would it really be the item names causing this error or is there something funky going on with the data?

The error means that there are items with no response data within some group. And no, 'q1:q20' is not valid input.

Phil

Andrea Bizarro

unread,
Mar 25, 2016, 3:57:38 PM3/25/16
to Phil Chalmers, mirt-package
That's what it says but all analyses I do with the dataset called in the model indicate there is no missing data. Have there been any bugs reported in this code? I do not know what to do further to troubleshoot. 


Reply all
Reply to author
Forward
Message has been deleted
0 new messages