1
votes

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.

1
Could be a bug. Can you give a reproducible example? - Kamil Bartoń
This has now ben updated with a reproducible example - Gitu
@KamilBartoń this has now been updated with a a reproducible example - Gitu
The data file under the link is not accessible for non-users. - Kamil Bartoń
@KamilBartoń link is now accessible to non-users - Gitu

1 Answers

2
votes

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")