Slope value for regression line when model has an interaction term

Viewed 19

I have to different linear regression models here. The first one is without interaction. for the model "ml_syst_vs_age_and_sex" i know that the slope value is the value of Age (0.691627).

Here is the dataframe im working with.

enter image description here

ml_syst_vs_age_and_sex = ols("Syst ~ Age + Sex + 0", data=df).fit()

enter image description here

Here i have the second model "ml_with_interaction". I have no idea how to interpret that interaction term. Anyway, i need to use plt.axline() function to build two regression lines for both Female and Male by hand, but i don't know does the interaction term affect the slope value? Is the slope in this model with interaction still the value of Age (0.895710)? Or does the interaction change it somehow?

ml_with_interaction = ols("Syst ~ Age * Sex + 0", data=df).fit()

enter image description here

0 Answers
Related