wilcox_TOST {TOSTER} | R Documentation |
TOST with Wilcoxon-Mann-Whitney tests
Description
A function for TOST using the non-parametric methods of the Wilcoxon-Mann-Whitney family of tests. This function uses the normal approximation and applies a continuity correction automatically.
Usage
wilcox_TOST(
x,
...,
hypothesis = "EQU",
paired = FALSE,
eqb,
low_eqbound,
high_eqbound,
ses = "rb",
alpha = 0.05
)
## Default S3 method:
wilcox_TOST(
x,
y = NULL,
hypothesis = "EQU",
paired = FALSE,
eqb,
low_eqbound,
high_eqbound,
ses = c("rb", "odds", "cstat"),
alpha = 0.05,
mu = 0,
...
)
## S3 method for class 'formula'
wilcox_TOST(formula, data, subset, na.action, ...)
Arguments
x |
a (non-empty) numeric vector of data values. |
... |
further arguments to be passed to or from methods. |
hypothesis |
'EQU' for equivalence (default), or 'MET' for minimal effects test, the alternative hypothesis. |
paired |
a logical indicating whether you want a paired t-test. |
eqb |
Equivalence bound. Can provide 1 value (negative value is taken as the lower bound) or 2 specific values that represent the upper and lower equivalence bounds. |
low_eqbound |
lower equivalence bounds (deprecated). |
high_eqbound |
upper equivalence bounds (deprecated). |
ses |
Standardized effect size. Default is "rb" for rank-biserial correlation. Options also include "cstat" for concordance probability, or "odds" for Wilcoxon-Mann-Whitney odds (otherwise known as Agresti's generalized odds ratio). |
alpha |
alpha level (default = 0.05) |
y |
an optional (non-empty) numeric vector of data values. |
mu |
number indicating the value around which (a-)symmetry (for one-sample or paired samples) or shift (for independent samples) is to be estimated. See stats::wilcox.test. |
formula |
a formula of the form lhs ~ rhs where lhs is a numeric variable giving the data values and rhs either 1 for a one-sample or paired test or a factor with two levels giving the corresponding groups. If lhs is of class "Pair" and rhs is 1, a paired test is done. |
data |
an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula. By default the variables are taken from environment(formula). |
subset |
an optional vector specifying a subset of observations to be used. |
na.action |
a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action"). |
Details
For details on the calculations in this function see vignette("robustTOST")
.
If only x is given, or if both x and y are given and paired is TRUE, a Wilcoxon signed rank test of the null that the distribution of x (in the one sample case) or of x - y (in the paired two sample case) is symmetric about mu is performed.
Otherwise, if both x and y are given and paired is FALSE, a Wilcoxon rank sum test (equivalent to the Mann-Whitney test: see the Note) is carried out. In this case, the null hypothesis is that the distributions of x and y differ by a location shift.
Value
An S3 object of class
"TOSTnp"
is returned containing the following slots:
"TOST": A table of class
"data.frame"
containing two-tailed wilcoxon signed rank test and both one-tailed results."eqb": A table of class
"data.frame"
containing equivalence bound settings."effsize": table of class
"data.frame"
containing effect size estimates."hypothesis": String stating the hypothesis being tested.
"smd": List containing information on standardized effect size.
"alpha": Alpha level set for the analysis.
"method": Type of non-parametric test.
"decision": List included text regarding the decisions for statistical inference.
References
David F. Bauer (1972). Constructing confidence sets using rank statistics. Journal of the American Statistical Association 67, 687–690. doi: 10.1080/01621459.1972.10481279.
Myles Hollander and Douglas A. Wolfe (1973). Nonparametric Statistical Methods. New York: John Wiley & Sons. Pages 27–33 (one-sample), 68–75 (two-sample). Or second edition (1999).
See Also
Other Robust tests:
boot_log_TOST()
,
boot_t_TOST()
,
boot_t_test()
,
brunner_munzel()
,
log_TOST()
Other TOST:
boot_log_TOST()
,
boot_t_TOST()
,
simple_htest()
,
t_TOST()
,
tsum_TOST()
Examples
data(mtcars)
wilcox_TOST(mpg ~ am,
data = mtcars,
eqb = 3)