Statistics, Machine Learning, Data Science, Financial Planning, Python.
factor1 * factor2', data=df).fit() # Create the ANOVA table anova_table = sm.stats.anova_lm(model, typ=2) # Print the ANOVA table print(anova_table) sum_sq df F PR(>F) factor1 2.105594e+02 2.0 2.163282e+01 0.000907 factor2 NaN 1.0 NaN NaN factor1:factor2 3.369607e-28 2.0 3.461925e-29 1.000000