# S3 method for formula
mood.medtest(formula, data, subset, ...)
Value
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.
Arguments
x
a numeric vector of data values.
g
a vector or factor object giving the group for the corresponding elements of x.
exact
a logical indicating whether an exact p-value should be computed.
formula
a formula of the form a ~ b, where a and b give the data values and corresponding groups.
data
an optional data 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.
...
further arguments to be passed to or from other methods.
Author
Maxime HERVE <maxime.herve@univ-rennes1.fr>
Details
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.