
SignTest(x, ...)
## S3 method for class 'default':
SignTest(x, y = NULL, alternative = c("two.sided", "less", "greater"),
mu = 0, conf.level = 0.95, ...)
## S3 method for class 'formula':
SignTest(formula, data, subset, na.action, \dots)
"greater"
,
"less"
, or "two.sided"
, or the initial letter of each,
indicating the specification of the alternative hypothesis. For
one-sample tests, alternative
refelhs ~ rhs
where lhs
gives the data values and rhs the corresponding groups.model.frame
) containing the variables in the formula formula
.
By default the variables are taken from environment(formula)
getOption("na.action")
.htest
, containing the following components:mu
.SignTest
computes a x
and y
are provided. If only x
is provided,
the x
is drawn is mu
.
For the two-sample dependent case, the null hypothesis is
that the median for the differences of the populations from which x
and y
are drawn is mu
.
The alternative hypothesis indicates the direction of divergence of the
population median for x
from mu
(i.e., "greater"
,
"less"
, "two.sided"
.)
The confidence levels are exact.t.test
, wilcox.test
, ZTest
, binom.test
,
SIGN.test
in the package x <- c(1.83, 0.50, 1.62, 2.48, 1.68, 1.88, 1.55, 3.06, 1.30)
y <- c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29)
SignTest(x, y)
wilcox.test(x, y, paired = TRUE)
d.light <- data.frame(
black = c(25.85,28.84,32.05,25.74,20.89,41.05,25.01,24.96,27.47),
white <- c(18.23,20.84,22.96,19.68,19.5,24.98,16.61,16.07,24.59),
d <- c(7.62,8,9.09,6.06,1.39,16.07,8.4,8.89,2.88)
)
d <- d.light$d
SignTest(x=d, mu = 4)
wilcox.test(x=d, mu = 4, conf.int = TRUE)
SignTest(x=d, mu = 4, alternative="less")
wilcox.test(x=d, mu = 4, conf.int = TRUE, alternative="less")
SignTest(x=d, mu = 4, alternative="greater")
wilcox.test(x=d, mu = 4, conf.int = TRUE, alternative="greater")
# test die interfaces
x <- runif(10)
y <- runif(10)
g <- rep(1:2, each=10)
xx <- c(x, y)
SignTest(x ~ group, data=data.frame(x=xx, group=g ))
SignTest(xx ~ g)
SignTest(x, y)
SignTest(x - y)
Run the code above in your browser using DataLab