I have been using the dredge
function in the MuMIn package to conduct model averaging on my global GAM model (using bam
from the mgcv package), with a priori selected explanatory variables and two random effects and a negative binomial distribution.
gsGlob <- bam(gs~ species + season + sex + TL2 + year + s(ri, bs="ad") +
cloud + s(current2) + s(depth2) + DHW +
salinity2 + SST.anomaly2 + s(SST.variability2) + wind2 +
s(code, bs = 're') + s(station, bs = 're'),
family=nb(), data=allVars_node_dat, na.action = "na.fail", discrete = TRUE)
And I'm using pdredge from MuMIn so I can increase the speed of the dredge.
mycluster = makeCluster(5, type = "SOCK") ## also need snow installed
#data must exported to the cluster - see 'details' https://rdrr.io/cran/MuMIn/man/pdredge.html
clusterExport(mycluster,"allVars_node_dat")
#required packages must be also loaded there
clusterEvalQ(mycluster, library(mgcv))
gsGlob_dredge <- MuMIn::pdredge(gsGlob, mycluster)
The top model has a vastly different AIC to the others, but has -23 degrees of freedom
What does this mean? Should I be ignoring and removing the top model as that doesn't seem right and conducting the model averaging on the other models? Or is it OK to use this as the top model?
The full dataset from the dredge can be found here and the full dataset here