Solved – interpretation of gam model

generalized-additive-modelr

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)")

enter image description here

Best Answer

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.

Related Question