Error when using dredge on a GLMM fitted with GAMLSS

141 views Asked by At

I receive the following error when I try to use dredge on a model fitted using GAMLSS with a random effect.

data(usair)  
usair$rand<-c(rep("A",11),rep("B",10),rep("C",10),rep("D",10))
fit1<-gamlss(y~x1+x2+x3+x4+x5+re(random=~1|rand), data=usair, family = "GA",na.action="na.fail" )
dredge(fit1, rank = "BIC")

Error in matrix(NA_real_, ncol = 3L, nrow = length(x), dimnames = list(coefNames, : length of 'dimnames' [1] not equal to array extent

Can anyone tell me why? Is there a way around it?

Furthermore, when I try to use the function ggpredict on the model I get the following error:

Error: Confidence intervals could not be computed.

  • Reason: "variable lengths differ (found for 're(random = ~1 | rand)')"
  • Source: model.frame.default(object, data, xlev = xlev)

This would suggest that the problem is with the random effect. Both functions work when I remove the random effect.

0

There are 0 answers