edge.pvalue: Function to compute empirical p-values

View source: R/edge.pvalue.R

edge.pvalueR Documentation

Function to compute empirical p-values

Description

Given a pattern, it splits and returns the slot of interest.

Usage

edge.pvalue(stat, stat0, pool = TRUE)

Arguments

stat

vector of observed statistics.

stat0

matrix of null statistics, where rows are features and columns are iterations.

pool

features are interchangeable, e.g. unlist all null statistics.

Value

A vector of empirical p-values.

Author(s)

Jeffrey T Leek, Leonardo Collado-Torres (examples)

Examples


## Vector of statistics
z <- rnorm(100, mean = 2)

## Matrix with one row per element in the vector of statistics
## and one column per permutation (here 100)
z0 <- matrix(rnorm(1e5), nrow = 100)

## Pool all the permutations (default)
edge.pvalue(z, z0, pool = TRUE)

## Or don't pull them
edge.pvalue(z, z0, pool = FALSE)

LieberInstitute/jaffelab documentation built on April 1, 2024, 7:26 a.m.