You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to create predictions with ggpredict but I ran to this error:
> P <- ggpredict(ModGAMLSS, terms=c("VAR1"), back_transform=T)
Error in names(x) <- value :
'names' attribute [10] must be the same length as the vector [4]
I am using gamlss-package and ga() function to build my model, and my model is something like this: gamlss(Response~X+ga(s(VAR1)+s(VAR2)+te(VAR3, VAR4)), sigma.fo=~VAR4, data=data, family=LOGNO2)
When I use predict(model, type="terms") it is not able to separate the terms in ga() into their own columns. I can extract gam model object with getSmo(model) and when I do that, it is able to separate the smooth terms into their own columns, but ggpredict() doesn't work with the object returned by getSmo():
> P <- ggpredict(getSmo(ModGAMLSS), terms=c("VAR1"), back_transform=T)
Error in model_data[, rn, drop = FALSE]:
! Can't subset columns that don't exist.
✖ Column Y.var doesn't exist.
I really like using ga() when I want to bring my gam() model from mgcv-package to gamlss package.
I wonder if there is a possibility to get ga() compatibility with ggeffects?
The text was updated successfully, but these errors were encountered:
Well, confusingly I edited and subset my data to make a dataset for reproducible example and then it worked (though couldn't compute confidence intervals), so I have no idea why my original data doesn't work. So it must has something to do with the number of variables in the model, as I reduced the number of variables for the subset data.
Hey!
I am using ggeffects 1.7.2.
I tried to create predictions with ggpredict but I ran to this error:
> P <- ggpredict(ModGAMLSS, terms=c("VAR1"), back_transform=T)
I am using gamlss-package and ga() function to build my model, and my model is something like this:
gamlss(Response~X+ga(s(VAR1)+s(VAR2)+te(VAR3, VAR4)), sigma.fo=~VAR4, data=data, family=LOGNO2)
I believe this is because I used ga() function from gamlss.add package to fit my smooth terms. https://www.rdocumentation.org/packages/gamlss.add/versions/5.1-13/topics/ga
When I use predict(model, type="terms") it is not able to separate the terms in ga() into their own columns. I can extract gam model object with getSmo(model) and when I do that, it is able to separate the smooth terms into their own columns, but ggpredict() doesn't work with the object returned by getSmo():
> P <- ggpredict(getSmo(ModGAMLSS), terms=c("VAR1"), back_transform=T)
I really like using ga() when I want to bring my gam() model from mgcv-package to gamlss package.
I wonder if there is a possibility to get ga() compatibility with ggeffects?
The text was updated successfully, but these errors were encountered: