[R-sig-ME] NAs in fixed effects
Henrik.Thurfjell at slu.se
Wed Jan 5 14:18:24 CET 2011
I have a rather large dataset which needs one random effect to be analysed properly (group). I also have many explanatory variables, each with a few NAs at different places.
I can easily enough fit a model with 2 fixed effects, but as the number of fixed effects increase so does tha NAs as they are not in the same rows. I am no statistician, and this may be a naive question, but is there a way to fit each fixed efefct with its full data?
My first ide was to use lme, where na.pass works, but I found this comment by Bates;
"I don't think you want to use na.pass here. The underlying C code for
fitting lme or lmer models doesn't take kindly to finding NA's in the
I couldnt make na.pass work in any other package dealing with mixed models.
there are a few NAs in the data scattered throughout, eliminating the data severly (although each single variable only have 0-10%NA)
This may illustrate what my problem is;
Ignore that the data is not enough to analyse and only has two levels of the random effect, that is not the important bit. I want my model (x~y+pa+pb+pc+pd+pe+pf+(1|group))
to use 10 values on y and 9 values on the p variables. not 4 values on all.
Is that even possible?
Regards Henrik Thurfjell
More information about the R-sig-mixed-models