EllenJCoombs / cetacean-strandings-project

Repository for strandings project
MIT License
3 stars 0 forks source link

Residual plots for gam checking #8

Closed nhcooper123 closed 6 years ago

nhcooper123 commented 6 years ago

Remind us of what the residual plots should be for checking the gam

dill commented 6 years ago

Okay, so we want something that looks at the per-covariate residuals over bins of the residual values. Something like...

load("Model_for_Dave.Rdata")
sst_bins <- cut(all_strandings$Max_SST, c(14,15,16,17,18))
sst_resid_data <- data.frame(SST=sst_bins, resids=residuals(All_strand))
boxplot(resids~SST, data=sst_resid_data)

which looks like this:

screen shot 2017-11-10 at 16 42 26

the variation in each boxplot should be pretty consistent if the model is good.