Description Usage Arguments Value Author(s) Examples
To estimate the both pre-liminary and final p-values,
tool.normalize normalizes the given data, x, based on
Gaussian distribution defined by prm if it is provided. If
prm is not provided tool.normalize utilizes the mean and
std dev of x.
1 | tool.normalize(x, prm = NULL, inverse = FALSE)
|
x |
data that is aimed to be normalized and produced by a simulation process |
prm |
normalization will take place according to the specified
Gaussian distribution parameters, i.e. mean and std dev. If it is not
specified, Gaussian statistics of |
inverse |
specifies whether the normalization takes place in reverse order |
prm |
transformed (normalized) parameters for either enrichment score or p-values |
Ville-Petteri Makinen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | set.seed(1)
## let us assume we have a set of simulated enrichment scores and
## one observed score
x <- rnorm(10) ## obtained from 1st permutation test
obs <- rnorm(1)
## Estimate preliminary P-value:
param <- tool.normalize(x)
z <- tool.normalize(obs, param)
p <- pnorm(z, lower.tail=FALSE)
## Estimate final P-value.
y <- rnorm(10) ## obtained from 2nd permutation test
param <- tool.normalize(c(x, y))
z <- tool.normalize(obs, param)
p <- pnorm(z, lower.tail=FALSE)
p <- max(p, .Machine$double.xmin)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.