View source: R/simulate.null.R
simulate.null | R Documentation |
Simulate transcripts from a specified null distribution.
## S3 method for class 'null'
simulate(x, x.distribution, r, r.distribution)
x |
A numeric vector of transcripts. |
x.distribution |
A numeric code corresponding to the optimal distribution of
|
r |
A numeric vector of residuals calculated for this transcript. |
r.distribution |
A numeric code corresponding to the optimal distribution of |
A numeric vector of the same length as x
. Names are not retained.
# 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
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.