Performs a Fligner-Policello test of the null that the medians in the two groups (samples) are the same.
fp.test(x, ...)# S3 method for default
fp.test(x, y, delta = 0, alternative = "two.sided", ...)
# S3 method for formula
fp.test(formula, data, subset, ...)
test statistics.
p-value of the test.
a character string describing the alternative hypothesis.
a character string indicating the name of the test.
a character string giving the names of the data.
the specified hypothesized value of the median difference.
a numeric vector of data values.
a numeric vector of data values.
null difference in medians tested.
a character string specifying the alternative hypothesis, must be one of "two.sided"
(default), "greater"
or "less"
.
a formula of the form a ~ b
, where a
and b
give the data values and corresponding groups.
an optional data 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.
further arguments to be passed to or from other methods.
Maxime HERVE <maxime.herve@univ-rennes1.fr>
The Fligner-Policello test does not assume that the shape of the distribution is similar in two groups, contrary to the Mann-Whitney-Wilcoxon test. However, it assumes that the the distributions are symmetric.
x <- rpois(20,3)
y <- rpois(20,5)
fp.test(x,y)
Run the code above in your browser using DataLab