Today's topic: Interaction in Regression Analysis
Considered the hardest part of the class.
Upcoming topics will cover practical applications and logistic regression.
Interaction occurs when the effect of one predictor variable on the response variable depends on the value of another predictor.
Contrast with additive model: No interaction means the effects of predictors add up independently.
Variables: Blood pressure (response), Age, Gender (predictors)
No Interaction: Effect of age on blood pressure is the same for males and females (parallel lines).
With Interaction: Effect of age on blood pressure is different for males and females (non-parallel lines).
Participants: Males and females were divided into treatment and control groups.
Initial average weight was equal in both groups.
After treatment, weight changes differ:
Males: Some weight loss.
Females: More significant weight loss.
Conclusion: Interaction exists between treatment effect and gender; the effect of the treatment depends on gender.
Include cross product term in the model for interaction.
Example predictors: Gender (X1), Treatment (X2).
Coefficients:
Beta0: Average weight for females in control group (both X1 and X2 are 0).
Beta1: Difference in average weight between males and females in the control group.
Beta2: Difference in average weight between treatment and control for females.
Beta3: Difference in differences, quantifying the interaction effect.
Determines how the effect of one predictor varies at different levels of another predictor.
If Beta3 is significant, it confirms interaction is present.
Separate equations for each category:
Plugging in values provides distinct slopes for effects on the response variable.
If slopes are equal, indicates no interaction.
Collect terms involving predictors to find slopes:
Example: Y = Beta0 + Beta1X1 + Beta2X2 + Beta3X1X2
Interpretation of slopes depends on the interacting variables.
Positive or negative signs of interaction terms indicate the type of relationship among predictors and response.
Positive interaction: Effect of one variable increases with the value of another.
Negative interaction: Effect of one variable decreases with increasing value of another.
To include interaction in models:
Use multiplication (X1*X2) or colon (X1:X2) syntax.
Model summary provides coefficients and significance levels for interpretation.
Understanding interaction is crucial for accurately modeling relationships in regression analysis.
Next session: Discuss practical coding and work through practice problems from the Framingham data.