FriedmanTest¶
- class robusta.groupwise.FriedmanTest(**kwargs)¶
Bases:
robusta.groupwise.models.AnovaRuns a Friedman test, similar to a non-parametric between subject anova for one variable.
- Parameters
data (pd.DataFrame) – Containing the subject, dependent and within variables as columns.
formula (str, optional) – An R-style formula describing the statistical model. In the form of (dependent ~ within | subject). If used, the parsed formula will overrides the following arguments dependent, 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.
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.
- Raises
ValueError – If a within-subject variable has been specified using within argument or formula.
ValueError – If more than one between-subjects variable was specified using between argument or formula.
Notes
R function - friedman.test: https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/friedman.test