mood.medtest | R Documentation |
Performs a Mood's median test to compare medians of independent samples.
mood.medtest(x, ...)
## Default S3 method:
mood.medtest(x, g, exact = NULL, ...)
## S3 method for class 'formula'
mood.medtest(formula, data, subset, ...)
x |
a numeric vector of data values. |
g |
a vector or factor object giving the group for the corresponding elements of |
exact |
a logical indicating whether an exact p-value should be computed. |
formula |
a formula of the form |
data |
an optional data frame containing the variables in the formula |
subset |
an optional vector specifying a subset of observations to be used. |
... |
further arguments to be passed to or from other methods. |
If exact=NULL
, a Fisher's exact test is used if the number of data values is < 200; otherwise a chi-square test is used, with Yates continuity correction if necessary.
method |
a character string indicating the name of the test. |
data.name |
a character string giving the name(s) of the data. |
statistic |
the value the chi-squared test statistic (in case of a chis-square test). |
parameter |
the degrees of freedom of the approximate chi-squared distribution of the test statistic (in case of a chis-square test). |
p.value |
the p-value of the test. |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
set.seed(1716)
response <- c(rnorm(10,3,1.5),rnorm(10,5.5,2))
fact <- gl(2,10,labels=LETTERS[1:2])
mood.medtest(response~fact)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.