fuzzy.sign.test: Fuzzy P-value, Decision, or Confidence Interval for the Sign...

Description Usage Arguments Details Value References See Also Examples

View source: R/fuzzy.sign.test.R

Description

Calculate the fuzzy P-value, the fuzzy decision, or the fuzzy confidence interval associated with the sign test.

Usage

1
2
3
4
fuzzy.sign.test(x, alternative = c("two.sided", "less", "greater"),
    mu = 0, tol = sqrt(.Machine$double.eps), alpha)
fuzzy.sign.ci(x, alternative = c("two.sided", "less", "greater"),
    tol = sqrt(.Machine$double.eps), conf.level = 0.95)

Arguments

x

numeric vector of data values.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

mu

a number specifying the value of the median of the data distribution hypothesized under the null hypothesis.

tol

data values within tol of mu are considered equal to mu.

alpha

if missing, calculate the fuzzy P-value. If provided, must be between zero and one, then calculate the fuzzy decision.

conf.level

confidence level.

Details

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.

Value

A list with class "fuzzyranktest" or class "fuzzyrankci" containing some of the following components:

knots

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.

values

the values of the CDF of the fuzzy P-value at the knots.

knot.values

the values of the membership function of the fuzzy confidence interval at the knots.

interval.values

the values of the membership function of the fuzzy confidence interval between the knots.

reject.prob

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.

alpha

the argument alpha.

statistic

the value of the test statistic with a name describing it.

null.value

the argument mu.

alternative

a character string describing the alternative hypothesis.

method

the type of test applied.

data.name

a character string giving the names of the data.

conf.level

the argument conf.level.

tol

the argument tol.

References

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

See Also

plot.fuzzyrankci, plot.fuzzyranktest, print.fuzzyrankci, print.fuzzyranktest.

Examples

1
2
3
4
5
6
7
#### make up data ####
x <- c(-1.2, -0.7, 0.2, 0.2, 0.2, 0.3, 0.4, 0.9, 0.9, 1.0, 1.0,
    1.1, 1.5, 1.7, 1.9, 3.5, 5.1)
fuzzy.sign.test(x)
plot(fuzzy.sign.test(x))
fuzzy.sign.ci(x)
plot(fuzzy.sign.ci(x))

fuzzyRankTests documentation built on Aug. 14, 2021, 9:07 a.m.