I saw a comment here by @gavin-simpson y-axis values in plot(gam) , I don't understand why trans = exp
is used instead of trans = plogis
, how do u decide which one to use?
The code I am using
library(mgcv)
b <- gam(outcome ~ s(week, k = 4, fx = TRUE, by = food) + food, data = df1, family = betar(link="logit"), method = "REML")
summary(b)
My dependent variable is in proportion from 0 to 1. Week is a form of timeline measure, and food is a categorical variable.
When I do trans = plogis
, I get the plot below
plot(b, pages = 1, trans = plogis, shift = coef(b)[1])
How shall I interpret this plot here with trans = plogis
?
When I do trans = exp
, I get the plot below
plot(b, pages = 1, trans = exp, shift = coef(b)[1])
My question is why am I getting values larger than 1 when I do trans = exp
?
I am new to GAM and still learning, any guidance is appreciated.