Description Usage Arguments Details Value Examples
summarizett
Perform significance tests as defined across columns in
a data.frame/matrix.
1 2 | summarizett(dat, phenotype, maxgroups = 5, sig = 0.05,
adjmethod = "bonferroni", num.test = wilcox.test, cl.test = fisher.test)
|
dat |
|
phenotype |
Vector of phenotypes. See details. |
maxgroups |
Maximum number of groups for contigency table test. |
sig |
P-value cut-off for making a significant call. |
adjmethod |
Method for p-value correction. Default: 'bonferroni'. |
num.test |
|
cl.test |
|
This function allows the user to quickly analyze a set of variables
against a set of samples with 2 or more phenotypes. Since a t.test
or wilcox.test
is used for continuous variables, variables
with >2 phenotypes are restricted only to ordinal/categorical variables.
Input is a data.frame (preferably) or matrix where columns correspond
to variables and rows correspond to samples. Depending on the class
of the column, a different test is used. If the class is numeric,
the defined num.test
is used. If the class is factor/character,
cl.test
is used instead.
Adjusted p-values are calculated using defined adjmethod
.
A data.frame with the following columns:
p-value of the specific test.
p < sig
.
adjusted p-value.
adjp < sig
1 2 3 4 5 6 7 8 9 10 | pheno <- factor(sample(c('case','control'), 50, replace = TRUE))
dat <- matrix(rnorm(100),nrow = 50, ncol = 2)
dat <- cbind(dat, jitter(as.numeric(pheno)))
dat <- cbind(dat, sample(c('Pos','Neg'),50,replace = TRUE))
dat <- as.data.frame(dat, stringsAsFactors = FALSE)
colnames(dat) <- paste('Var',1:4,sep='_')
# Run summarizett. Var_3 is significant.
summarizett(dat, pheno)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.