sweepystats.anova.ANOVA#
- class sweepystats.anova.ANOVA(df, formula)#
A class to perform (k-way) ANOVA based on the sweep operation.
Parameters: + df: A pandas dataframe containing the covariates and outcome. + formula: A formula string to define the model, e.g.
‘y ~ Group + Factor + Group:Factor’.
- __init__(df, formula)#
Methods
__init__(df, formula)f_test(variable)Tests whether variable in self.formula is significant by performing an F-test.
fit([verbose])Fit ANOVA model by sweep operation
sum_sq()Computes sum of squared error for all variables that are currently swept in