JenniNiku/gllvm

gllvm crashes with tweedie

Closed this issue · 5 comments

The following example crashes gllvm:

data("microbialdata")
dat<-exp(microbialdata$Y)
mod<-gllvm(dat,num.lv=2,family="tweedie")

This can also happen when the data are in the proper range but starting values are poor, e.g., when using starting.val="random" or when attempting to fit a complex model that poorly fits the data.

Should probably add defense programming to check for NA in the predictors, and throw a error if there are any.

I also get an error with a tweedie and trying to fit quadratic terms in formula (x + x2) - "error in optim... L-BFGS-B need finite values of 'fn'". Model works with gaussian.

Thanks James. That indicates poor starting values, but is not a bug and unrelated to this issue.

It can help to fit a model where the power parameter is estimated instead. You can do that by installing the github version of the package and by setting Power = NULL. If that doesn't work you might want to try a range of values for the Power parameters manually.

Thanks, I'll try that. If I have further Qs I'll post in Discussions.