# Difference between interaction terms and test for interaction

I am having difficulties in understanding the difference between interaction terms and test for interaction. I am using logistic regression models so maybe the concept is different compared to linear regression?

As far as I understood from this explanation, interaction terms let you know how the relationship between two variables changes when a third variables assumes different values. For example: how relationship between death and age changes according to sex (e.g. if sex=male or sex=female how the OR changes). But from the interaction terms I can also know if there is a significant difference between the changes due to sex, is this correct? This is the source from what I understood this.

So what is then the point of performing tests for interactio)? For instance, I run a logistic regression in males to obtain the OR for death and age and then I run the logistic regression for females to obtain the OR, and then I compare the two ORs using test for interaction.

What is the correct method to assume that two subgroups (e.g. males and females) have a significantly difference relationship between age and death? What are the differences between interaction terms and test for interaction?

That is not the "test for interaction" that the page you link describes. The test there is based on two nested models, not two separate models for males and females. One model includes predictors individually (e.g., ~ age + sex) and the other including the interaction between them (often coded ~ age*sex in R, which expands to ~ age + sex + age:sex, with age:sex the interaction term). The two nested models are then compared by a likelihood-ratio test.
There nevertheless can be some confusion about lower-level coefficients in such models, even with lower-level interaction coefficients when the model includes higher-level interactions, as their values depend on the coding of interacting predictors. The Anova() function in the R car package can test all coefficients associated with a predictor in a joint t-test or Wald test. That overcomes those difficulties in interpreting the individual coefficients.