MyNixOS website logo
Description

Robust P-Value Combination Methods.

The meta-analysis is performed to increase the statistical power by integrating the results from several experiments. The p-values are often combined in meta-analysis when the effect sizes are not available. The 'metapro' R package provides not only traditional methods (Becker BJ (1994, ISBN:0-87154-226-9), Mosteller, F. & Bush, R.R. (1954, ISBN:0201048523) and Lancaster HO (1949, ISSN:00063444)), but also new method named weighted Fisher’s method we developed. While the (weighted) Z-method is suitable for finding features effective in most experiments, (weighted) Fisher’s method is useful for detecting partially associated features. Thus, the users can choose the function based on their purpose. Yoon et al. (2021) "Powerful p-value combination methods to detect incomplete association" <doi:10.1038/s41598-021-86465-y>.

metapro

Introduction

The meta-analysis is conducted to increase the statistical power by combining evidences (e.g., effect sizes and p-values) obtained from multiple experiments. The p-value combination has been widely used for meta-analysis when effect sizes are not available. metapro is a CRAN R package that provides functions for p-value combinations. There are four functions including

  1. wFisher : weighted Fisher's method
  2. wZ : weighted Z-method
  3. lancaster : Lancaster's procedure

The original Fisher's method and (weighted) Z-method have been commonly used for p-value combination. In particular, the Z-method is effective when a feature is associated with most of the cohorts. However, this attributes is disadvantageous detecting partially associated patterns (e.g., detection of African-specific features in trans-ethnic analysis).Therefore, in this study, we designed the ordmeta and wFisher method that work effectively in those situations. The detailed formulas are described in our paper.

Installation

Prerequisites

  1. JAVA : If not installed yet, please install it first. Download: https://www.java.com/en/
  2. Rtools (for Windows): Rtools are required for Windows users. Download: https://cran.r-project.org/bin/windows/Rtools/

After all prerequisites are installed, open R and install the metapro package by typing

install.packages('devtools') # install 'devtools'
library(devtools)
install_github('unistbig/metapro', INSTALL_opts=c("--no-multiarch"))
library(metapro) # Load metapro package

or

install.packages('metapro', INSTALL_opts=c("--no-multiarch")) 
library(metapro)

Tip: Dealing with Errors
In most cases, installation errors come from 1) encoding problem and 2) JAVA environment variable settings.
So, please try followings.<p>

Encoding error
On Windows,

  • System locale setting modification: Click Start -> Control panel-> Clock and Region -> Region -> Administrative -> Change system locale... -> set 'Current system locale' as English (United States) and check the box in the below (Beta: Use Unicode UTF-8 for worldwide language support).
  • Reboot the PC, and execute Rstudio.
  • In the R console, type
Sys.setlocale('LC_ALL','C')

and install the package again.

Error from JAVA setting
Most error will occur with rJAVA. In this case, please

  • Check whether both JAVA and R are 64-bit, and
  • Set proper environment variable for JAVA_HOME, CLASSPATH, and RPATH.
  • Tip: System environment variable can be easily set by using Set.setenv() function in R. For example,
Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jdk1.8.0_211")
Sys.setenv(CLASSPATH="C:\\Program Files\\Java\\jdk1.8.0_211\\jre\\lib\\ext")
Sys.setenv(RPATH="C:\\Program Files\\R\\R-3.6.0\\bin\\x64")

If you are Linux or Mac OSX user, type following on terminal and re-open the R console after setting the environment variables.

sudo R CMD javareconf

Next, check whether rJAVA is installed correctly, and try installing metapro again.

install.packages('rJava')
library(rJava)

Usage

1. wFisher

wFisher is designed to assign weights to each experiment based on the sample size.

Example

wFisher(p=c(0.01, 0.02, 0.8, 0.25), weight = c(200, 500, 100, 80), is.onetail=FALSE, eff.sign = c(1,1,1,-1))
will return

$p
[1] 0.003060523

$overall.eff.direction
[1] "+"

Input Arguments and Values

Arguments
p A numeric vector of p-values
is.onetail Logical. If set TRUE, p-values are combined without considering the direction of effect, and vice versa. Default: TRUE.
weight A numeric vector of weight or sample size for each experiment. Note! If no weight option is given, the original Fisher method is performed.
eff.sign A vector of signs of effects. It works when is.onetail = FALSE
Value
p Combined p-value
overall.eff.directionThe direction of combined effects.

2. wZ

Weighted Z-method. This function has been modified from sumz function in metap package.

Example

wZ(p=c(0.01, 0.02, 0.8, 0.25), weight = c(200, 500, 100, 80), is.onetail=FALSE, eff.sign = c(1,1,1,-1))
will return

[1] 0.001798156

$overall.eff.direction
[1] "+"

$sumz
[1] 2.911558

Input Arguments and Values

Arguments
p A numeric vector of p-values
is.onetail Logical. If set TRUE, p-values are combined without considering the direction of effect, and vice versa. Default: TRUE.
weight A numeric vector of weight or sample size for each experiment. Note! If no weight option is given, the Stouffer's method is performed.
eff.sign A vector of signs of effects. It works when is.onetail = FALSE
Value
p Combined p-value
overall.eff.directionThe direction of combined effects.
sumzTransformed sum of z-values

3. lancaster

Lancaster's procedure - the generalized version Fisher's method

Example

lancaster(p=c(0.01, 0.02, 0.8, 0.25), weight = c(200, 500, 100, 80), is.onetail=FALSE, eff.sign = c(1,1,1,-1))
will return

$p
[1] 0.005694935

$overall.eff.direction
[1] "+"

Input Arguments and Values

Arguments
p A numeric vector of p-values
is.onetail Logical. If set TRUE, p-values are combined without considering the direction of effect, and vice versa. Default: TRUE.
weight A numeric vector of weight or sample size for each experiment. Required!
eff.sign A vector of signs of effects. It works when is.onetail = FALSE
Value
p Combined p-value
overall.eff.directionThe direction of combined effects.

Contact

Sora Yoon: [email protected]
Department of Biological Sciences, UNIST.

Metadata

Version

1.5.11

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows