cat.stat {siggenes} | R Documentation |
Generates the required statistics for a Significance Analysis of Microarrays of categorical data such as SNP data.
Should not be called directly, but via sam(..., method = cat.stat).
cat.stat(data, cl, B = 100, approx = FALSE, n.split = 1, check.for.NN = FALSE, lev = NULL, B.more = 0.1, B.max = 50000, n.subset = 10, rand = NA)
data |
a matrix or data frame. Each row must correspond to a variable/SNP, and each column to a sample |
cl |
a numeric vector of length ncol(data) indicating to which class
a sample belongs. Must consist of the
integers between 1 and c, where c is the number of different groups |
B |
the number of permutations used in the estimation of the null distribution, and hence, in the computation of the expected d-values |
approx |
should the null distribution be approximated by the Chisquare-distribution? |
n.split |
number of chunks in which the variables are splitted in the computation
of the values of the test statistic. Currently, only available if approx = TRUE .
By default, the test scores of all variables are calculated simultaneously.
If the number of variables or observations is large, setting n.split to a
larger value than 1 can help to avoid memory problems |
check.for.NN |
if TRUE , it will be checked if any of the genotypes
is equal to "NN" or "NoCall". Might be very time-consuming when the data set is high-dimensional |
lev |
numeric or character vector specifying the codings of the levels of the variables/SNPs. Must only be specified if the variables are not coded by the integers between 1 and the number of levels. If the codings of the levels differ between variables, a list can be used to specify the different codings. In this case, each element of this list must be a numeric or character vector specifying the codings, where all elements must have the same length |
B.more |
a numeric value. If the number of all possible permutations is smaller
than or equal to (1+B.more )*B , full permutation will be done.
Otherwise, B permutations are used |
B.max |
a numeric value. If the number of all possible permutations is smaller
than or equal to 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 |
n.subset |
a numeric value indicating how many permutations are considered simultaneously when computing the expected d-values |
rand |
numeric value. If specified, i.e. not NA , the random number generator
will be set into a reproducible state |
For each SNP, Pearson's Chi-Square statistic is computed to test if the distribution of the SNP differs between several groups. Since only one null distribution is estimated for all SNPs as proposed in the original SAM procedure of Tusher et al. (2001) all SNPs must have the same number of levels/categories.
a list containing statistics required by sam
This procedure will only work correctly if all SNPs/variables have the same number of levels/categories. Therefore, it is stopped when the number of levels differ between the variables.
Holger Schwender, holger.schw@gmx.de
Schwender, H. (2004). Modifying Microarray Analysis Methods for Categorical Data – SAM and PAM for SNPs. To appear in: Proceedings of the the 28th Annual Conference of the GfKl.
Tusher, V.G., Tibshirani, R., and Chu, G. (2001). Significance analysis of microarrays applied to the ionizing radiation response. PNAS, 98, 5116-5121.