# interpretation of gam model

I'm doing a gam model for the adherence of hypertensive participants in a cohort study . My response variable is hypertension (no and yes) and my explanatory is the month of the interview.

My question is how to interpret the graph model.

My script:

library(mgcv)
model = gam(hyper ~  s(month), fx=FALSE, family=binomial,data=dados)
summary(model)
plot(model, residuals=F, se=TRUE,pch=19, cex=0.75, scheme=1, shade=T,shade.col='gray90', xlab = "moth", ylab = "f(hypertension)")


• Consider trying method='REML' to select $\lambda$. Less tendency to undersmooth. Your example looks noisy. Oct 5, 2014 at 22:06

You might interpret it as until Month 13: Month increases the propability of hyper whereas after month 13 it decreases it.

Some explanaition:

The plot shows your s(month) function.
s by default is a thin plate regression spline (see ?s).
Quoting ?plot.gam

For plots of 1-d smooths, the x axis of each plot is labelled with the covariate name, while the y axis is labelled s(cov,edf) where cov is the covariate name, and edf the estimated (or user defined for regression splines) degrees of freedom of the smooth. scheme == 0 produces a smooth curve with dashed curves indicating 2 standard error bounds. scheme == 1 illustrates the error bounds using a shaded region.

You labled the y-Axis f(hypertension), which IMHO makes not that much sence.

Since this example is for a model whose response is of the binomial family, the vertical axis shows the additive effect on the log-odds of success (e.g. hypertension) when using a smoothing function of 'month'.

• Hi! Could I exponentiate it and interpret it like odds ratio? If you could help to answer this question I would be very grateful Mar 6, 2021 at 19:19