![]() I have also changed the method in the bam model from REML to GCV.1 Package MuMIn JanuType Package Title Multi-model inference Version Date Encoding UTF-8 Author Kamil Bartoń Maintainer Kamil Bartoń Model selection and model averaging based on information criteria (AICc and alike). Gam_dredge<-dredge(gam_global,evaluate=TRUE,fixed=c("offset(offset)","s(StationID,bs="re)"),rank="AIC") Gam_dredge<-dredge(gam_global,evaluate=TRUE,fixed=c("offset(offset)","s(StationID)"),rank="AIC") ![]() I tried the following two approaches with no success: #genertric random effect name as shown in model summary output I also need to retain the offset term in all models.Īfter conducting a web search, I tried the following based on this post 1 ![]() I am not interested in determining if the random effect is needed and need to keep it in all models as the random effect. When I run the dredge function on the global model the random effect is dropped from a subset of the models as dredge is running through the different model options with and without certain variables. The random effect is s(StationID, bs = 're') gam_global<-bam(Numberpertow ~ s(interval,k=6)+Stratum+ClosArea+CruiseID+s(interval, by=CruiseID,k=6)+offset(offset)+s(StationID, bs = 're'),data=l.data,method = "REML",family=nb(),na.action = "na.fail") The global model using bam from the package mgcv is below. I am using the dredge function from the MuMin package for a gam with a random effect:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |