# Error using ltm R package

I'm using the R package ltm to create a 2-parameter logistic regression.

The input matrix is sparse - many users have taken a small subset of the items in the item bank.

For some of my data sets i'm running into this error:

Error in if (any(ind <- pr == 0)) pr[ind] <- sqrt(.Machine\$double.eps) :
missing value where TRUE/FALSE needed


Not sure what the issue is. Doesn't repro on most of my data sets. Any thoughts?

• Can you post the R code which raised this error? Are you using the ltm function? – chl Dec 28 '12 at 22:55
• My code is very simple: pmodel <- ltm(pivot2 ~ z1) where pivot2 is my item ~ user dataframe. – Samir Dec 29 '12 at 0:15
• I think I figured out the issue (after much pain): If any of the item columns contains less than two question responses, then the library will throw the above error. The solution was to drop any columns (items) that didn't meet that criteria. – Samir Dec 29 '12 at 0:18