IQSS / Amelia

Amelia: A Package for Missing Data
http://gking.harvard.edu/amelia
61 stars 17 forks source link

bugfix on amcheck #3

Closed jrnold closed 9 years ago

jrnold commented 9 years ago

If casewise deletion deletes all observations amcheck will throw the error below when running lm to check for collinear variables

 Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
 contrasts can be applied only to factors with 2 or more levels
mattblackwell commented 9 years ago

Thanks. I actually think we have this bug fixed in the develop branch. In fact, the problem is worse because it will fail if the number of non-deleted observations is lower than the number of variables in the imputation model. If you get a chance to test against develop and still find the problem, we can incorporate. Hopefully we'll get a new version updated soon.

jrnold commented 9 years ago

Yup, fixed in develop. Sorry that I didn't try that branch. A student of mine came across the problem. I'll let them know to install that branch.