Statistics, Machine Learning, Data Science, Financial Planning, Python.
sm.stats.anova_lm(model, typ=2) # Print the ANOVA table print(anova_table) # Plot the interaction effect plt.figure(figsize=(8, 6)) sns.pointplot(x='factor1', y='y', hue='factor2', data=df, ci='sd', capsize=0.1) plt.title('Interaction Effect Plot') plt.xlabel('Factor 1') plt.ylabel('Mean of y')