Open laljeet opened 2 years ago
@laljeet is the DEQ irrigation here the one normalized by median historic withdrawal? Is it by county total? Thanks!
In the above equation (lmer), it is by county. No transformations.
Cool. Can we see a plot of this? Can we test for leverage of big or small values?
Irrigation and precip are correlated, which is expected.
vif.mer(lmm2) lmm2 here is: lmer(log(Total_irrigation_withdarwals_calculated) ~ PPT + Irrigation+Min_Temp+Mean_Temp+Max_Temp+Zero_PPT_days+ Extreme_days+SDI+GC+(YEAR|COUNTYFP), data=dat2)
Thanks for sharing this.
Model form comparison - as a best practice, we should use an AIC criteria (I believe you can either do this within lme4 or the MuMin package) to investigate model form and eliminate unnecessary variables. Model forms to compare:
Do this for the Total Withdrawals and VDEQ Reported models. We'll mainly use the VDEQ reported results but should keep total just so we're consistent with what we scoped to USGS. We don't need to do the full scatterplot visualization and variable significance test for each form, but as a first step just create a table showing AIC values for each combination of parameters (all, 4, 2, and 1) and response variable (total and VDEQ reported withdrawals)
We can also test forms where we replace log(W) as the response variable with (W_obs)/(W_mean), where W_mean is the long-term average value for a county. In this case, we probably can replace the mixed effects model form with a simple OLS regression because all of the intercept terms would be equal to 1.
Thanks for laying these out @julieshortridge -- @laljeet I can't recall if you were computing deficit on the same rolling 2-day window as effective precip, or aggregating it seasonally. Or did you do a variation of Irr where you're adding daily deficit? If so, it can quite possibly be different math.
FWIW, daily adding is certainly more appropriate imo in that if plants get no precip for 6 weeks then double precip for 3 weeks they won't make up that deficit.
As I mentioned in the meeting, my preference would simply be to accumulate running total (ET-rain) and then have the irrigation facilities pump that value. To elaborate, I think the model would work best if we accumulate deficit on a 3-7 day frequency (for computing total), and have irrigators pump 1-2 days per week. This may or may not fit well with this approach but I wanted to lay out more detail on how I think of that process.
Regression Parameters: Based on VIF (VIF < 3) for DEQ and Total WIthdarwals model Parameters selected:
Selection of best model using AIC (lower AIC better model) Five models were used (mentioned by Dr.Shortridge above) (T min was used instead of Tmax)
Using builtin AIC command: Model 2 using four parameters gave the best results.
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
| df | AIC -- | -- | -- Deq_withdrawals_model1 | 12 | 3329.54 **Deq_withdrawals_model2 | 10 | 3326.949** Deq_withdrawals_model3 | 8 | 3356.182 Deq_withdrawals_model4 | 7 | 3412.221 Deq_withdrawals_model5 | 7 | 3412.144
Predictor Variables:
Response Variable:
Could be any of
Equation used (confirm with Dr.Shortridge) :
_lmm2 <- lmer(DEQ_Irrigation_withdrawals ~ PPT + Irrigation+Min_Temp+Mean_Temp+Max_Temp+Zero_PPT_days+ Extremedays+SDI+GC+(1+YEAR|COUNTYFP), data=dat2, REML = FALSE)
The effect of YEAR will vary between COUNTYFP. Random intercepts for YEAR, random slopes for COUNTYFP influenced by YEAR.??