Open djhocking opened 10 years ago
I moved the variables that vary by catchment (drainage area, forest cover, elevation, etc.) to be fixed effects and let those parameters that varied by day and catchment have random slopes by HUC8 and sample site within HUC8. This seems to have fixed the major problems and the model gets reasonable convergence.
I also had to completely remove the 1 day lagged air temperature from the model because it covaried with air temp and the 2 day lagged air temp so strongly that their was no mixing and little movement of the chains.
Having a 2-day lag but no 1-day lag is a bit odd. It might make more sense just to have a 3-5 day average air temperature in addition to the daily air temp. There is already some old code for this that Kyle had written. It's best to not use too long an average because it would then be collinear with the day of the year function.
Using the ggmcmc package for visualization, there is strong autocorrelation in the iterations for snow-water equivalent and mild autocorrelation for the standard deviations of a few parameters. Since there is little snow or snowpack in the synchronized portion of the year, it might be that we can just remove swe from the model.
Looks good except the site level variation in the effects of precip and the 2 lags precips show strong serial autocorrelation in the iterations. I'm not sure what to do about this. I could make these fixed effects but I'm not sure that's a better solution.
When all covariates are allowed to have varying slopes their is high autocorrelation, colinearity, and poor mixing. Make some covariates have fixed slopes.