I am trying to do model selection for generalized additive mixed models (made using gamm4 using the MuMIn package in R. I am essentially trying to follow this piece of literature for model selection with MuMIn and gamm4.
I am creating a model with 9 variables, and a random individual effect - which looks likes this:
library(gamm4)
library(MuMIn)
SouthFull = gamm4(OtoWidth ~ s(Ages) +
LagFinFSLdat_AnnEsts +
FSL_months_Feb +
LagFSLdat_Annual +
LagFSLdat_Spring +
LagFSL_months_Oct+
FinFSLdat_SummerDat +
FinFSLdat_AutumnDat +
LagFSL_months_Nov , random = ~(1|FishName), data = South)
But when I try to use the dredge
function, it fails with the error message:
(dd <- dredge(global.model=SouthFull))
Error in dredge(global.model = SouthFull) : result is empty
In addition: There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In gamm4::gamm4(...) : family not recognized (model 1 skipped)
...
50: In gamm4::gamm4(...) : family not recognized (model 50 skipped)
Is this due to a problem with MuMIn not recognizing the gamm4 model family?
Full code & data can be found at my GitHub repository and the specific issue is in the code gamm_analysis.R, with the specific warnings found at line 81.
Thank you in advance