The function has implemented the nonparametric test of
Madhava Rao and Raghunath (2016) for testing paired two-samples
for symmetry. The null hypothesis
mrrTest(x, ...)# S3 method for default
mrrTest(x, y = NULL, m = NULL, ...)
# S3 method for formula
mrrTest(formula, data, subset, na.action, ...)
A list with class "htest"
containing the following components:
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
the estimated quantile of the test statistic.
the p-value for the test.
the parameters of the test statistic, if any.
a character string describing the alternative hypothesis.
the estimates, if any.
the estimate under the null hypothesis, if any.
numeric vector of data values. Non-finite (e.g., infinite or missing) values will be omitted.
further arguments to be passed to or from methods.
an optional numeric vector of data values: as with x non-finite values will be omitted.
numeric, optional integer number, whereas
a formula of the form response ~ group
where
response
gives the data values and group
a vector or
factor of the corresponding groups.
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)
.
an optional vector specifying a subset of observations to be used.
a function which indicates what should happen when
the data contain NA
s. Defaults to getOption("na.action")
.
Let
Let
Further, let the divider denote
The two counts are
and
The test statistic is
The exact p-values for
If m = NULL
the function uses
Madhava Rao, K.S., Ragunath, M. (2016) A Simple Nonparametric Test for Testing Treatment Versus Control. J Stat Adv Theory Appl 16, 133–162. tools:::Rd_expr_doi("10.18642/jsata_7100121717")
## Madhava Rao and Raghunath (2016), p. 151
## Inulin clearance of living donors
## and recipients of their kidneys
x <- c(61.4, 63.3, 63.7, 80.0, 77.3, 84.0, 105.0)
y <- c(70.8, 89.2, 65.8, 67.1, 87.3, 85.1, 88.1)
mrrTest(x, y)
## formula method
## Student's Sleep Data
mrrTest(extra ~ group, data = sleep)
Run the code above in your browser using DataLab