AndreaNOdell / hake_growth

Spatiotemporal variation in weight-at-age and its impact on fisheries management
2 stars 0 forks source link

Choosing best gam model #5

Open AndreaNOdell opened 2 years ago

AndreaNOdell commented 2 years ago

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 avg_growth_anomaly_gams

Model 4 and 5: increase in variability in more recent years avg_growth_anomaly_cohort_gams

model 6: cyclic? avg_growth_anomaly_cohort_year_gams

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? growth_anomaly_cohort

AndreaNOdell commented 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!

AndreaNOdell commented 2 years ago

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/

Screen Shot 2022-07-20 at 11 16 39 AM