I have a mixed effect model to model crop yield as a function of rainfall and temperature:
mdl <- lmer(yield ~ rainfall + I(rainfall^2) + I(temperature^2) +
(1|location) + (1|year))
I look at the predicted values and the some values of predicted yield are negative. Now realistically, yield can never be negative. So what do I do:
(1) make all the predicted negative values of yield equal to 0. Does this makes sense?
OR
(2) log the observed yield value.
mdl <- lmer(log(yield) ~ rainfall + I(rainfall^2) + I(temperature^2) +
(1|location) + (1|year))
Backtransforming the logged predicted yield value will always be positive and hence my predicted yield will never be zero. However, taking the log of yield makes my residuals more skewed and violate the normality assumption.
Any advise?
I can provide data and plots if needed.