1

When I apply model.sel function to g0 model below, it runs fine. However when I create similar models using my data, I get the error as shown below. Any clues in why I could be getting this error?

data(sleepstudy,package="lme4")
g0 <- glmmTMB(Reaction~Days+(Days|Subject),sleepstudy)
model.sel(g0)

The above runs fine, however, this doesn't:

Data location: https://mqoutlook-my.sharepoint.com/:f:/g/personal/joseph_mbui_mq_edu_au/EjFIajIJxxxBsIBcMi3GyIMBc6FyN4a5y-39cDev2Aoyng?e=tUTj2W

datT<-read.csv('datT.csv')
myModel<-glmmTMB(y~x1+x2+ (1|randomEffect),list(family="beta",link="logit"), data=datT)
model.sel(myModel)
Error in vapply(unique(f), function(x) if (is.na(x)) NA_character_ else formals(get(x))$link,  : 
values must be length 1,
but FUN(X[[1]]) result is length 0

The only difference between the two configurations is that I am fitting beta family

I have tried switching na.options and have installed the latest versions of the associated packages.

Gitu
  • 33
  • 5

1 Answers1

2

This was caused by the unusual family formulation by glmmTMB. It is fixed now in MuMIn 1.40.7 on R-Forge: install.packages("MuMIn", repos="http://R-Forge.R-project.org")

Kamil Bartoń
  • 1,482
  • 9
  • 10
  • Here is a new error that I get with `model.sel`: `Error in if (REML) { : argument is of length zero` – Gitu Jun 17 '18 at 11:14
  • This error does not seem to come from any of MuMIn's functions. Run a `traceback()` after the error. – Kamil Bartoń Jun 18 '18 at 14:09
  • For me, I was using `summary` on glmmTMB objects and getting `Error in if (REML) { : argument is of length zero`. I was loading in saved objects that were run under R < 3.5 into R 3.5. I reran the models and saved the objects under R 3.5 and the error was resolved. FWIW. – swihart Oct 30 '18 at 17:42