trend.test: Test for increasing trend with correlated binary data
Description
The trend.test function provides a common interface
to the trend tests implemented in this package:
SO.trend.test, RS.trend.test,
and GEE.trend.test. The details of each test
can be found on their help page.
Usage
trend.test(cbdata, test = c("RS", "GEE", "GEEtrend", "GEEall", "SO"),
exact = test == "SO", R = 100, control = soControl())
character string defining the desired test
statistic. "RS" performs the Rao-Scott test
(RS.trend.test), "SO" performs the
stochastic ordering test (
exact
logical, should an exact permutation test be
performed. Only an exact test can be performed for "SO".
The default is to use the asymptotic p-values except for
"SO".
R
integer, number of permutations for the exact
test
control
an optional list of control settings for
the stochastic order ("SO") test, usually a call to
soControl. See there for the names of the
settable control values and their effect.
Value
A list with two components and an optional "boot" attribute
that contains the detailed results of the permutation test
as an object of class boot if an exact
test was performed.
statisticnumeric, the value of the test statistic
p.valnumeric, asymptotic one-sided p-value of the
test
data(shelltox)
trend.test(shelltox, test="RS")
set.seed(5724)
#R=50 is too low to get a good estimate of the p-valuetrend.test(shelltox, test="RS", R=50, exact=TRUE)