Calculate the fuzzy P-value, the fuzzy decision, or the fuzzy confidence interval associated with the Mann-Whitney-Wilcoxon rank sum test.
fuzzy.signrank.test(x, alternative = c("two.sided", "less", "greater"),
mu = 0, tol = sqrt(.Machine$double.eps), alpha)
fuzzy.signrank.ci(x, alternative = c("two.sided", "less", "greater"),
tol = sqrt(.Machine$double.eps), conf.level = 0.95)
numeric vector of data values.
a character string specifying the alternative
hypothesis, must be one of "two.sided"
(default),
"greater"
or "less"
. You can specify just the initial
letter.
a number specifying the value of the median of the data distribution hypothesized under the null hypothesis.
data values within tol
of mu
are considered
equal to mu
.
if missing, calculate the fuzzy P-value. If provided, must be between zero and one, then calculate the fuzzy decision.
confidence level.
A list with class "fuzzyranktest"
or class "fuzzyrankci"
containing some of the
following components:
the vector of points at which the CDF of the fuzzy P-value,
which is continuous and piecewise linear, has discontinuous derivative
or the vector of points at which the membership function of the fuzzy
confidence is discontinuous and also -Inf
or Inf
if the
fuzzy confidence interval is unbounded.
the values of the CDF of the fuzzy P-value at the knots.
the values of the membership function of the fuzzy confidence interval at the knots.
the values of the membership function of the fuzzy confidence interval between the knots.
if alpha
is specified, the probability the
randomized test rejects the null hypothesis, which is the same as
the probability the fuzzy P-value is less than alpha
.
the argument alpha
.
the argument mu
.
a character string describing the alternative hypothesis.
the type of test applied.
a character string giving the names of the data.
the argument conf.level
.
the argument tol
.
The fuzzy P-value is a random variable taking values in the interval \((0, 1)\). Its cumulative distribution function (CDF) is continuous and piecewise linear. Hence its probability density function (PDF) is piecewise constant (a step function). If \(P\) is the fuzzy P-value, considered as a random variable, then the randomized test that rejects the null hypothesis at significance level \(\alpha\) when \(P < \alpha\) is an exact (randomized) test.
The fuzzy confidence interval is a fuzzy set, whose “membership function” is a function on the parameter space taking values in the interval \([0, 1]\). For rank tests, it is piecewise constant (a step function). In the regular case, it is one on a narrow interval and some number between zero and one on the part of some wider interval not contained in the narrower interval, zero outside the wider interval, and the values at jumps are the average of left and right limits. In this case, the fuzzy interval can be easily interpreted as a mixture of two confidence intervals (the narrow and the wide). When no ties are possible, the values at the jumps do not matter. Otherwise, they do. With ties, any or all of the intervals can be degenerate, and the values at the jumps are not related to left and right limits. If \(I(\mu)\) is the membership function of the fuzzy confidence interval, then the randomized test that rejects the null hypothesis that \(\mu\) is the true parameter value with probability \(1 - I(\mu)\) is an exact (randomized) test.
Charles J. Geyer (submitted). Fuzzy P-values and Ties in Nonparametric Tests. http://www.stat.umn.edu/geyer/fuzz/ties.pdf
Charles J. Geyer and Glen D. Meeden (2005). Fuzzy and Randomized Confidence Intervals and P-values. To appear in Statistical Science (with discussion). http://www.stat.umn.edu/geyer/fuzz/fuzz5.pdf
plot.fuzzyrankci
,
plot.fuzzyranktest
,
print.fuzzyrankci
,
print.fuzzyranktest
.
# NOT RUN {
#### make up data ####
x <- c(-3, -2, -2, 0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 5, 6, 7)
fuzzy.signrank.test(x, alt = "less")
plot(fuzzy.signrank.test(x, alt = "less"))
fuzzy.signrank.ci(x)
plot(fuzzy.signrank.ci(x))
# }
Run the code above in your browser using DataLab