View source: R/combine_pvalues.R
combine_pvalues | R Documentation |
Combine p-values of a feature over multiple p-value columns of an object. If alternative!="two.sided"
,
uses the direction of stat.cols
to transform p.cols
into one-sided p-values; this assumes that
these p-values were originally calculated from two-sided tests, as is done in limma.
combine_pvalues(
tab,
p.cols = "p|PValue",
stat.cols = "logFC|slope|cor|rho|Direction",
only.p = TRUE,
alternative = c("two.sided", "greater", "less", "Up", "Down")
)
tab |
Matrix-like object with statistical columns, some containing p-values. |
p.cols |
Indices or |
stat.cols |
Indices or |
only.p |
Logical; should only combined p-values be returned? If not, returns matrix with z-scores and FDRs also. |
alternative |
Direction of change: |
Z-transform method is used to combine p-values across rows, similarly to using unweighted
method="z.transform"
in survcomp::combine.test
, except this function slightly adjusts
p-values of zero or one to avoid generating z-scores of infinite magnitude.
stat.cols
are ignored if alternative
is "two.sided"
. Otherwise, they should match p.cols
.
Vector of p-values.
tab <- data.frame(foo.p=(1:9)/9, bar.p=(9:1)/9)
combine_pvalues(tab)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.