3

I'm new to modelling and not sure how to interpret this interaction for a results section. The model output tells me that the interaction between cancer (binary) and age (continuous - one year increments) has a p-value of 0.0073 and a relative risk of 1.08 (95%CI of 1.03-1.34). Does this mean that for every one year increase in age, the risk of experiencing the outcome increases by 8.0% for people with cancer?

Thank you

Eska4
  • 31
  • Could you specify more precisely what you're doing? Are you running a logistic regression of some binary outcome on age and an indicator variable for the presence of cancer? – Matthew Gunn Aug 15 '19 at 21:14
  • I'm using a log binomial model for a binary outcome (development of severe influenza or not) and cancer (binary) is one of my risk factor study variables (e.g., does having cancer lead to the development of severe influenza). Age (continuous) is one of my covariates. – Eska4 Aug 15 '19 at 21:23
  • Can you show the model output produced by your software? That would make things a lot easier. – Isabella Ghement Aug 15 '19 at 21:47

1 Answers1

3

Assuming that the regression model is: $$ \mathrm{logit}(p)=\beta_{0}+\beta_{1}\mathrm{age} + \beta_{2}\mathrm{cancer} + \beta_{3}\mathrm{age}\times\mathrm{cancer} $$

where $\mathrm{cancer}$ is a dummy variable that is 1 for people who have cancer and 0 for people who don't. For people who don't have cancer, the model simplifies to $$ \mathrm{logit}(p)=\beta_{0}+\beta_{1}\mathrm{age} + \beta_{2}\times 0 + \beta_{3}\mathrm{age}\times 0 = \beta_{0}+\beta_{1}\mathrm{age} $$ so that for those, the odds of developing severe influenza increases by a factor of $\exp(\beta_{1})$ (odds ratio) per additional year of age. For people who do have cancer, the model is $$ \mathrm{logit}(p)=\beta_{0}+\beta_{1}\mathrm{age} + \beta_{2}\times 1 + \beta_{3}\mathrm{age}\times 1 = (\beta_{0} + \beta_{2}) + (\beta_{1} + \beta_{3})\mathrm{age} $$ so that the odds of developing severe influenza increases by a factor of $\exp(\beta_{1} + \beta_{3})$ (odds ratio) per additional year of age.

Another way of looking at it is that the regression lines for age on the log-odds scale are not parallel for the two groups (cancer and not cancer). Therefore, $\beta_{3}$ is the difference of the slope of the regression line for age on the log-odds scale for people who have cancer compared to the slope of the line for those who don't have cancer.

Here is a graph that illustrates the situation. The corresponding R code used to generate the graph is at the end of this answer.

LogisticInteraction

The plot on top displays the relationship on the log-odds scale whereas the lower plot is on the response scale (i.e. probability). You can see that the lines on the log-odds scale (upper graph) are not parallel, which indicates an interaction between cancer status and age.

set.seed(142857)

library(visreg)

n <- 500

age <- runif(n, 20, 60)  

cancer <- rbinom(n, 1, 0.25)

linpred <- log(0.2) + log(1.03)*age + log(1.2)*cancer + log(1.08)*age*cancer

pr <- 1/(1 + exp(-linpred))   

y <- rbinom(n, 1, pr)  

mod <- glm(y~age*cancer, family = binomial)

par(cex = 1.5, mar = c(4, 4, 2, 0.2), mfrow = c(2, 1))
visreg(mod
       , xvar = "age"
       , by = "cancer"
       , partial = FALSE
       , rug = FALSE
       , overlay = TRUE
       , ylab = "log-odds"
       , scale = "linear"
)
visreg(mod
       , xvar = "age"
       , by = "cancer"
       , partial = FALSE
       , rug = FALSE
       , overlay = TRUE
       , ylab = "Probability of severe influenza"
       , scale = "response"
)
COOLSerdash
  • 30,198