Let's say I want to regress crop yield as a function of rainfall and temperature.
I collected data across 20 locations and 10 years and construct a model regressing yield on rainfall and temperature with location and year as random effects in R.
mdl <- lmer(yield ~ rainfall + temperature + (1|location) + (1|year)
However, I know irrigation is quite important for crop yield. However, I have irrigation data only for one year across all the 20 locations. So I can construct a single model for a year using this:
mdl.yld <- lmer(yield ~ rainfall + temperature + irrigation + (1|location) # for a single year which has irrigation data
Can I use the regression coefficients of irrigation from mdl.yld
and add to the regression equation inmdl
so that I have an equation that predicts yield as a function of rainfall, temperature and irrigation?
lmer
does not impute data, unless I'm mistaken. Mixed models do have important connections with imputed analyses. I'm not aware that REML produces different estimates than ML in terms of how missing data are handled if that's what you're talking about. Maximum likelihood could also mean marginalizing the likelihood over missing values which is a complex likelihood. $\endgroup$