3
$\begingroup$

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

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

2 Answers 2

5
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

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'.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy