simulate.null {OutSeekR}R Documentation

Simulate from a null distribution

Description

Simulate transcripts from a specified null distribution.

Usage

## S3 method for class 'null'
simulate(x, x.distribution, r, r.distribution)

Arguments

x

A numeric vector of transcripts.

x.distribution

A numeric code corresponding to the optimal distribution of x as returned by identify.bic.optimal.data.distribution(). Possible values are

  • 1 = normal,

  • 2 = log-normal,

  • 3 = exponential, and

  • 4 = gamma.

r

A numeric vector of residuals calculated for this transcript.

r.distribution

A numeric code corresponding to the optimal distribution of x as returned by identify.bic.optimal.residuals.distribution(). Possible values are the same as those for x.distribution.

Value

A numeric vector of the same length as x. Names are not retained.

Examples

# Prepare fake data.
set.seed(1234);
x <- rgamma(
    n = 20,
    shape = 2,
    scale = 2
    );
names(x) <- paste('Sample', seq_along(x), sep = '.');
x.dist <- identify.bic.optimal.data.distribution(
    x = x
    );
r <- calculate.residuals(
    x = x,
    distribution = x.dist
    );
r.trimmed <- trim.sample(
    x = r
    );
r.dist <- identify.bic.optimal.residuals.distribution(
    x = r.trimmed
    );
null <- simulate.null(
    x = x,
    x.distribution = x.dist,
    r = r.trimmed,
    r.distribution = r.dist
    );

[Package OutSeekR version 1.0.0 Index]