I have the following GLMM with a random slope that I'm conducting model averaging on using MuMIn "dredge" (I don't think my dataset is relevant so I'm just including the code here):
sett_global2 <- glmmTMB(sett_dens~ depth_scale + sst_six_scale + exposure_six_month_daily_log_scale + (1|kelp)+ (0 + sst_six_scale|kelp) + (1|site) + (1|Year), data = sett_model_data, family=nbinom2)
When I originally tried to dredge the model, it worked but with the following warning messages:
dredge(sett_global2, beta = "none", rank = "AIC", trace = 2)
Warning messages: 1: Random slopes not present as fixed effects. This artificially inflates the conditional random effect variances. Solution: Respecify fixed structure! 2: Random slopes not present as fixed effects. This artificially inflates the conditional random effect variances. Solution: Respecify fixed structure! 3: Random slopes not present as fixed effects. This artificially inflates the conditional random effect variances. Solution: Respecify fixed structure!
indicating that even when the fixed effect of "sst_six_scale" wasn't in the model being fitted in the complete model set, the model was still being fitted with the random slope "(0 + sst_six_scale|kelp)".
So I tried to dredge the model again using the "dc" argument in the "subset" command to only include the random slope if the corresponding fixed effect was in the model:
dredge(sett_global2, beta = "none", rank = "AIC", subset = dc("cond(sst_six_scale)" , "cond(0 + sst_six_scale | kelp)"), trace = 2)
But I still end up with the same warning messages as before, indicating to me that the subset command didn't work properly. I made sure to use "getAllTerms" to get the appropriate variable names to put in the subset command, and I get no errors when running the above code, so I can't really think of any reason why it isn't working. This leads me to wonder if the "subset" command works with random effects at all. Can anyone shed light on this for me?