KruskalWallisTest¶
- class robusta.groupwise.KruskalWallisTest(**kwargs)¶
Bases:
robusta.groupwise.models.AnovaRuns a Kruskal-Wallis test, similar to a non-parametric between subject anova for one variable.
- Parameters
data (pd.DataFrame) – Containing the subject, dependent and `between’ and variables as columns.
formula (str, optional) – An R-style formula describing the statistical model. In the form of (dependent ~ between + 1 | subject). If used, the parsed formula will overrides the following arguments dependent, between, 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.
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 - kruskal.test: https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/kruskal.test