merge_p_values | R Documentation |
Merge a list or matrix of p-values
merge_p_values(
scores,
method = "Fisher",
scores_direction = NULL,
constraints_vector = NULL
)
scores |
Either a list/vector of p-values or a matrix where each column is a test. |
method |
Method to merge p-values. See 'methods' section below. |
scores_direction |
Either a vector of log2 transformed fold-change values or a matrix where each column is a test. Must contain the same dimensions as the scores parameter. Datasets without directional information should be set to 0. |
constraints_vector |
A numerical vector of +1 or -1 values corresponding to the user-defined directional relationship between the columns in scores_direction. Datasets without directional information should be set to 0. |
If scores
is a vector or list, returns a number. If scores
is a
matrix, returns a named list of p-values merged by row.
Eight methods are available to merge a list of p-values:
Fisher's method (default) assumes that p-values are uniformly
distributed and performs a chi-squared test on the statistic sum(-2 log(p)).
This method is most appropriate when the columns in scores
are
independent.
Fisher's method modification that allows for
directional information to be incorporated with the scores_direction
and constraints_vector
parameters.
Brown's method extends Fisher's method by accounting for the
covariance in the columns of scores
. It is more appropriate when the
tests of significance used to create the columns in scores
are not
necessarily independent. Note that the "Brown" method cannot be used with a
single list of p-values. However, in this case Brown's method is identical
to Fisher's method and should be used instead.
DPM extends Brown's method by incorporating directional information
using the scores_direction
and constraints_vector
parameters.
Stouffer's method assumes p-values are uniformly distributed
and transforms p-values into a Z-score using the cumulative distribution function of a
standard normal distribution. This method is appropriate when the columns in scores
are independent.
Stouffer's method modification that allows for
directional information to be incorporated with the scores_direction
and constraints_vector
parameters.
Strube's method extends Stouffer's method by accounting for the
covariance in the columns of scores
.
Strube's method modification that allows for
directional information to be incorporated with the scores_direction
and constraints_vector
parameters.
merge_p_values(c(0.05, 0.09, 0.01))
merge_p_values(list(a=0.01, b=1, c=0.0015, d=0.025), method='Fisher')
merge_p_values(matrix(data=c(0.03, 0.061, 0.48, 0.052), nrow = 2), method='Brown')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.