"trend.stat"(data, cl, catt = TRUE, approx = TRUE, B = 100, B.more = 0.1, B.max = 50000, n.subset = 10, rand = NA, ...)
"trend.stat"(data, cl, catt = TRUE, approx = TRUE, B = 100, B.more = 0.1, B.max = 50000, n.subset = 10, rand = NA, ...)
data
as a list consisting
of matrices, where each matrix represents one group and summarizes
how many observations in this group show which level at which variable. The row and column names
of all matrices must be identical and in the same order. The column names must be interpretable
as numeric scores for the different levels of the variables. These matrices can, e.g.,
be generated using the function rowTables
from the package scrime. (It is recommended
to use this function, as trend.stat
has been made for using the output of rowTables
.)
For details on how to specify this list, see the examples section on this man page, and the help for
rowChisqMultiClass
in the package scrime.ncol(data)
indicating to which classes
the samples in the matrix or data frame data
belongs. The values in cl
must be interpretable
as scores for the different classes. Must be specified if data
is a matrix or a data frame,
whereas cl
can but must not be specified if data
is a list. If specified in the latter case,
cl
must have length data
, i.e.\ one score for each of the matrices, and thus for each of
the groups. If not specified, cl
will be set to the integers between 1 and $c$, where $c$
is the number of classes/matrices.FALSE
,
the trend statistic described on page 87 of Agresti (2002) is determined which differs by the factor
$(n - 1) / n$ from the Cochran-Armitage trend statistic.FALSE
, a permutation method is used to estimate the null distribution.
If data
is a list, approx
must currently be TRUE
.B.more
)*B
, full permutation will be done.
Otherwise, B
permutations are used.B.max
, B
randomly selected permutations will be used
in the computation of the null distribution. Otherwise, B
random draws
of the group labels are used.NA
, the random number generator
will be set into a reproducible state.sam
.
Tusher, V.G., Tibshirani, R., and Chu, G. (2001). Significance analysis of microarrays applied to the ionizing radiation response. PNAS, 98, 5116-5121.
SAM-class
,sam
, chisq.stat
, trend.ebam