Wilcoxon1Sample¶
- class robusta.groupwise.Wilcoxon1Sample(p_exact: bool = False, p_correction: bool = True, **kwargs)¶
Bases:
robusta.groupwise.models.T1SampleRun a Wilcoxon signed rank test - non-parametric one-sample t-test alternative.
- Parameters
x (key in data or NumPy array of values, optional) – x can be used to specify. If str, x have to be key to column in data. If array-like, have to contain only objects that can be coerced into numeric. If not specified they are inferred based on the following arguments formula, and between or within (in this order).
mu (float, optional) – Value of the population to compare the sample (x) to. Default is None. y is an alias.
y (float, optional) – y is an alias of mu, superseded by mu.
tail (str, optional) – Direction of the tested alternative hypothesis. Optional values are ‘x!=y’ (Two sided test; aliased by ‘two.sided’), ‘x<y’ (lower tail; aliased by ‘less’) ‘x>y’ (upper tail; aliased by ‘greater’). Whitespace characters in the input are ignored. Default value is ‘x != y’.
ci (int) – Width of confidence interval around the sample mean difference. Float between 0 and 100. Default value is 95.
independent (str, optional) – The name of the column identifying the independent variable in the data. The column could be either numeric or object, but can contain up to two unique values. Alias for within for paired, between for unpaired.
data (pd.DataFrame) – Containing the subject, dependent and independent 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.
p_exact (bool, optional) – Whether to compute exact p-value or approximate it. Default is False.
p_exact – FILL THIS. Default is False.
Notes
R function - https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/wilcox.test