Anova

class robusta.groupwise.Anova(**kwargs)

Bases: robusta.groupwise.models.GroupwiseModel

Run a between, within or mixed frequentist ANOVA.

Parameters
  • data (pd.DataFrame) – Containing the subject, dependent, between’ and `within variables as columns.

  • formula (str, optional) – An R-style formula describing the statistical model. In the form of (dependent ~ between + within | subject). If used, the parsed formula will overrides the following arguments dependent, between, within and subject.

  • dependent (key in data, optional) – The name of the column identifying the dependent variable (i.e., response variable) in the data. The column data type should be numeric or a string that can be coerced to numeric. Overriden by formula if specified. Required if formula is not specified.

  • between (key(s) in data (str or array-like), optional) – The name of the column identifying the independent variable (i.e., predictor variable) in the data. Identifies variables that are manipulated between different subject units (i.e., exogenous variable). Overriden by formula if specified. Not required if formula is not specified, given within is is specified.

  • within (key(s) in data (str or array-like), optional) – The name of the column identifying the independent variable in the data (i.e., predictor variable). The Identifies variables that are manipulated within different subject units (i.e., endogenous variable). Overriden by formula if specified. Not required if formula is not specified, given between is is specified.

  • subject (str or key in data, optional) – The name of the column identifying the sampling unit in the data (i.e., subject). Overriden by formula if specified. Required if formula is not specified.

  • agg_func (str (name of pandas aggregation function) or callable, optional) – Specified how to aggregate observations within sampling.

  • effect_size (str, optional) – Optional values are ‘ges’, (\(generalized-{\eta}^2\)) ‘pes’ (\(partial-{\eta}^2\)) or ‘none’. Default value is ‘pes’.

  • correction (str, optional) – Sphericity correction method. Possible values are “GG” (Greenhouse-Geisser), “HF” (Hyunh-Feldt) or “none”. Default is ‘none’.

Notes

R function aov_4: https://www.rdocumentation.org/packages/afex/versions/0.27-2/topics/aov_car from the afex package 1

References

1

Singmann, H., Bolker, B., Westfall, J., Aust, F., & Ben-Shachar, M. S. (2015). afex: Analysis of factorial experiments. R package version 0.13–145.

Methods Summary

get_margins([margins_terms, by_terms, ci, …])

get_pairwise([margins_term, …])

report_text([as_list])

Methods Documentation

get_margins(margins_terms: Optional[List[str]] = None, by_terms: Optional[List[str]] = None, ci: int = 95, overwrite: bool = False)
get_pairwise(margins_term: Optional[str] = None, overwrite_pairwise_results: bool = False)
report_text(as_list=False)