Skip to content
Prev 18245 / 20628 Next

Error from glmmTMB().

It may be an overparameterization issue because I was able to get simpler models to work. We could make the error message clearer, but tried to document it at the bottom of the troubleshooting vignette. The general advice in that case is to (1) try rescaling predictor variables, (2) try a simpler model and build up, and (3) try different starting values, possibly based on a simpler model. 

I tried scaling Dose that that didn?t help. 

To get the right shape for starting values, you could check the structures in the unfitted model

mod  <- glmmTMB(fmla, data = X, family = betabinomial(link = "cloglog"),
              dispformula = ~1, doFit=FALSE)

dimnames(mod$data.tmb$X)[[2]]

dimnames(mod$data.tmb$Z)[[2]]

str(mod$parameters)

start <- list(beta=rep(0.1, 12), b=rep(.01, 12)) #fill in better values based on your best guess

fit3  <- glmmTMB(cbind(Dead, Alive) ~ Trt+0 +Dose + (1 | Rep), data = X, family = betabinomial(link = "cloglog"))


start <- list(beta = c(fixef(fit3)[[1]][1:6], rep(.1, 6)),
	b=c(unlist(ranef(fit3)[[1]]$Rep), rep(.1, 6)))
	
fit  <- glmmTMB(fmla, data = X, family = betabinomial(link = "cloglog"), start=start)

That was my best attempt at getting it to run, but it doesn?t work. 

If you think this is a bug, you could add it to the issue tracker on GitHub.

cheers,
Mollie