Open AndreaNOdell opened 2 years ago
I also successfully ran a few gam models in brms, but model 6 was taking a really long time so I am going to hold off on running that until we decide which model(s) is/are worth exploring!
example figures demonstrating global smoother (dashed line) with similar (top figure) or different (bottom figure) group level "wiggliness" (grey lines) from Pedersen et al. 2019. https://peerj.com/articles/6876/
I've been fitting a few different gam models (in scripts/weight-at-age.R).
1) gam with no random effect (weight ~ s(age)) 2) gam with year random effects, global smoother and same wiggliness across groups 3) gam with year random effects, global smoother and different wiggliness across groups 4) gam with cohort random effects, global smoother and same wiggliness across groups 5) gam with cohort random effects, global smoother and different wiggliness across groups 6) gam with cohort and year random effects, global smoother and same wiggliness across groups
model 6 has the lowest AIC, but each model shows a different story with the residuals. How should I go about choosing which model to start exploring more?
model 2 and 3: difficult to see a pattern
Model 4 and 5: increase in variability in more recent years
model 6: cyclic?
Also, interestingly, this next plot shows average growth anomaly through time for each cohort, using the model that has only year random effect. It seems as though cohorts born near/during a heatwave/el nino, become smaller-than-average as they grow older (hinting at potential negative effect on growth rate? except something weird happens with 2007) while those other years seem to stay pretty average around the predicted value. Not sure if I'm just reaching - what do you think?