Ben,
This is because you do not have all the possible response options represented for each item. For example, in your data below, item 2 has no '1's. I don't know if there is a workaround for this (other than deleting an item or faking a response), or if this is a function of IRT itself? Tom Fletcher -----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of ben kelcey Sent: Wednesday, October 14, 2009 4:32 PM To: r-help@r-project.org Subject: [R] ltm package error for grm (IRT) Using the grm function (graded response IRT model) in the ltm package I receive the following error: Error: subscript out of bounds for several scales I'd like to examine. Here's a small example that if run a few times will likley produce the error at least once ch<-array(round(runif(50,1,5)),c(10,5)) grm(ch,start.val="random") ## or grm(ch,constrained=F,IRT.param=T,start.val="random") I have cannot figure out where I have gone wrong and was unable to find mention of similar errors in the archives. Any help would be much appreciated. A subset of my actual data that produces the same error is pasted below Thank you, ben t2_sr1 t2_sr2 t2_sr3 t2_sr4 t2_sr5 1 5 1 5 5 1 4 1 4 4 4 2 4 2 1 4 5 4 1 4 1 5 5 1 5 1 4 1 5 5 3 2 4 2 4 5 3 5 1 1 4 2 4 4 2 1 4 1 4 5 2 4 4 4 2 1 4 2 3 4 2 2 4 3 2 2 4 2 3 3 4 3 2 3 3 2 5 2 5 5 1 4 1 4 4 3 3 2 3 4 2 4 2 3 4 3 3 3 2 2 > sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] splines stats graphics grDevices utils datasets methods base other attached packages: [1] car_1.2-16 epicalc_2.9.2.7 survival_2.35-4 foreign_0.8-37 faraway_1.0.4 [6] ltm_0.9-1 polycor_0.7-7 sfsmisc_1.0-8 mvtnorm_0.9-7 msm_0.9.3 [11] MASS_7.2-48 loaded via a namespace (and not attached): [1] tools_2.9.2 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.