2
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ Can you post the R code which raised this error? Are you using the ltm function? $\endgroup$ – chl Dec 28 '12 at 22:55
  • $\begingroup$ My code is very simple: pmodel <- ltm(pivot2 ~ z1) where pivot2 is my item ~ user dataframe. $\endgroup$ – Samir Dec 29 '12 at 0:15
  • 2
    $\begingroup$ 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. $\endgroup$ – Samir Dec 29 '12 at 0:18
4
$\begingroup$

I think I figured out the issue (after much pain):

If any of the item columns contains less than two question responses (i.e. the rest are NA), then the library will throw the above error. The solution was to drop any columns (items) that didn't meet that criteria.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.