fisher.method.perm: Derive a p-value for a summary statistic of p-values by...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Given a set of p-values and a summary statistic S:

S = -2 ∑ \log p,

a p-value for this statistic can be derived by randomly generating summary statistics [Rhodes,2002]. Therefore, a p-value is randomly sampled from each contributing study and a random statistic is calculated. The fraction of random statistics greater or equal to S then gives the p-value.

Usage

1
2
  fisher.method.perm(pvals, p.corr = c("bonferroni", "BH", "none"), 
  zero.sub = 1e-05, B = 10000, mc.cores = NULL, blinker = 1000)

Arguments

pvals

A matrix or data.frame containing the p-values from the single tests

p.corr

Method for correcting the summary p-values. BH: Benjamini-Hochberg (default); Bonferroni's method or no ('none') correction are currently supported.

zero.sub

Replacement for p-values of 0

B

Number of random statistics

mc.cores

Number of cores used for calculating the permutations. If not NULL the multicore package is used for parallelization with the given number of cores.

blinker

An indicator that prints "=" after each blinker rows of pvals in order to follow the progress.

Details

At the moment this function only supports situations were all passed p-values are not NA. We plan on extending this functionality in upcoming versions.

For large data sets and/or large B we strongly recommend using the mc.cores option as the calculation will otherwise be computationally demanding. This will call the mclapply function from the multicore package, which you will have to install in that case.

By default a blinker (a small string "=") is shown after each 1000 rows that were computed. This function allows you to assess the progress of the analysis. If you don't want to see the blinker set it to NA.

As log(0) results in Inf we replace p-values of 0 by default with a small float. If you want to keep them as 0 you have to provide 0 as a parameter in zero.sub.

Note that only p-values between 0 and 1 are allowed to be passed to this method.

Value

This method returns a data.frame containing the following columns

S

The statistic

num.p

The number of p-values used to calculate S

p.value

The overall p-value

p.adj

The adjusted p-value

Note

This function was copied from the CRAN package MADAM which is no longer maintained. Recognition goes to the original author(s) below.

Author(s)

Karl Kugler <karl@eigenlab.net>

References

Rhodes, D. R., (2002). Meta-analysis of microarrays: interstudy alidation of gene expression profiles reveals pathway dysregulation in prostate cancer. Cancer research, 62(15), 4427-33.

See Also

fisher.sum, fisher.method

Examples

1
2
3
4
5
6
7
  set.seed(123)
  pp <- matrix(c(runif(20),c(0.001,0.02,0.03,0.001)), ncol=4)
  fisher.method.perm(pp, B=10, blinker=1)
  ## Not run: 
    fisher.method.perm(pp, B=10000, mc.cores=3, blinker=1) #use multicore
  
## End(Not run)

pmoulos/metaseqR-local documentation built on May 9, 2019, 1:13 a.m.