trend.test {CorrBin} | R Documentation |
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()
)
Arguments
cbdata |
a |
test |
character string defining the desired test statistic. "RS"
performs the Rao-Scott 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 |
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.
statistic |
numeric, the value of the test statistic |
p.val |
numeric, asymptotic one-sided p-value of the test |
Author(s)
Aniko Szabo, aszabo@mcw.edu
See Also
SO.trend.test
, RS.trend.test
, and
GEE.trend.test
for details about the available tests.
Examples
data(shelltox)
trend.test(shelltox, test="RS")
set.seed(5724)
#R=50 is too low to get a good estimate of the p-value
trend.test(shelltox, test="RS", R=50, exact=TRUE)