wilcoxonZ | R Documentation |
Calculates the z statistic for a Wilcoxon two-sample, paired, or one-sample test.
wilcoxonZ(
x,
y = NULL,
mu = 0,
paired = FALSE,
exact = FALSE,
correct = FALSE,
digits = 3
)
x |
A vector of observations. |
y |
For the two-sample and paired cases, a second vector of observations. |
mu |
For the one-sample case,
the value to compare |
paired |
As used in |
exact |
As used in |
correct |
As used in |
digits |
The number of significant digits in the output. |
This function uses code from wilcox.test
,
and reports the z
statistic,
which is calculated by the original function
but isn't returned.
The returned value will be NA if the function attempts an exact test.
For the paired case, the observations in x
and
and y
should be ordered such that the
first observation in x
is paired with the first observation
in y
, and so on.
A single statistic, z
.
Salvatore Mangiafico, mangiafico@njaes.rutgers.edu, R Core Team
data(Pooh)
wilcoxonZ(x = Pooh$Likert[Pooh$Time==1], y = Pooh$Likert[Pooh$Time==2],
paired=TRUE, exact=FALSE, correct=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.