zScores: Function to calculate z-scores from p-values

Description Usage Arguments Value Author(s) See Also

View source: R/CMAPResults-accessors.R

Description

Function to calculate z-score from a normal distribution from a two-tailed p-value and sign vector (e.g. log2 fold change). To avoid -Inf/Inf z-scores, p-values < 'limit' are set to 'limit'.

Usage

1
zScores(pval, direction=NULL, tails=2, limit=.Machine$double.xmin)

Arguments

pval

Vector with p-values

direction

Vector that will be used to determine the sign of the z-scores. Only the sign of the values is considered, so any suitable vectors (e.g. log2 fold change) can be supplied.

limit

Numeric (default: .Machine$double.xmin). pvalues < 'limit' will be set to 'limit' to avoid Inf/-Inf z-scores. Set to NULL to disable.

tails

Numeric, either 1 for p-values from one-tailed or 2 for p-values from two-tailed tests.

Value

A vector of z-scores

Author(s)

Thomas Sandmann

See Also

qnorm


gCMAP documentation built on April 29, 2020, 3:54 a.m.