Description Usage Arguments Value Note Author(s) Examples
Perform a Wilcoxon signed rank test for a paired sample or a Wilcoxon rank sum test for independent samples on variables of a data set. The output is printed as a LaTeX table that mimics the look of SPSS output (version <24).
1 2 3 4 
data 
a data frame containing the variables. 
variables 
a character vector specifying numeric variable(s) to be
used. If 
group 
a character string specifying a grouping variable for the
Wilcoxon rank sum test, or 
exact 
a logical indicating whether the Wilcoxon rank sum test
should also return the pvalue of the exact test. The default is

x 
an object of class 
digits 
an integer vector giving the number of digits after the comma to be printed in the LaTeX tables. The first element corresponds to the number of digits in table with the summary of the ranks, and the second element corresponds to the number of digits in the table for the test. 
statistics 
a character vector specifying which LaTeX tables should
be printed. Available options are 
... 
currently ignored. 
An object of class "wilcoxonTestSPSS"
with the following
components:
statistics
a data frame containing the relevant information on the ranks.
test
a list containing the results of the Wilcoxon signed rank test (only pairedsample test).
variables
a character vector containing the name(s) of the relevant numeric variable(s).
n
an integer giving the number of observations (only pairedsample test).
w
numeric; the Wilcoxon rank sum test statistic (only independentsamples test).
asymptotic
a list containing the results of the Wilcoxon rank sum test using the normal approximation (only independentsamples test).
exact
a list containing the test statistic of the exact Wilcoxon rank sum test test, and if requested the corresponding pvalue (only independentsamples test).
group
a character string containing the name of the grouping variable (only independentsamples test).
type
a character string giving the type of Wilcoxon test
performed "paired"
or "independent"
).
The print
method produces a LaTeX table that mimics the look of SPSS
output (version <24).
The Wilcoxon rank sum test also reports the value of the equivalent MannWhitney U test statistic.
Andreas Alfons
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  ## paired sample
# load data
data("Exams")
# test whether grades differ between the
# regular exam and the resit
wilcoxonTest(Exams, c("Regular", "Resit"))
## independent samples
# load data
data("Eredivisie")
# test whether market values differ between Dutch and foreign
# players
wilcoxonTest(Eredivisie, "MarketValue", group = "Foreign")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.