Description Usage Arguments Details Value Author(s) References See Also Examples
Generate randomized SCUO indices in log normal distribution, but provided original unchanged SCUO order.
1 2 | scuo.random(SCUO, phi.Obs = NULL, meanlog = .CF.PARAM$phi.meanlog,
sdlog = .CF.PARAM$phi.sdlog)
|
SCUO |
SCUO index returned from |
phi.Obs |
optional object of format |
meanlog |
mean of log normal distribution. |
sdlog |
std of log normal distribution. |
This function takes SCUO
indices (outputs of
calc_scuo_values()
)
computes the rank of them, generates log normal random variables, and
replaces SCUO
indices by those variables in the same rank orders.
Typically, these random variables are used to replace expression values
when either no expression is observed or for the purpose of model validation.
If phi.Obs
is provided, the mean and std of log(phi.Obs)
are used
for log normal random variables. Otherwise, menalog
and sdlog
are used.
The default meanlog
and sdlog
was estimated from
yassour
dataset.
A vector of log normal random variables is returned.
Wei-Chen Chen wccsnow@gmail.com.
https://github.com/snoweye/cubfits/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
suppressMessages(library(cubfits, quietly = TRUE))
### example dataset.
y.scuo <- convert.y.to.scuo(ex.train$y)
SCUO <- calc_scuo_values(y.scuo)$SCUO
plotprxy(ex.train$phi.Obs, SCUO)
### yassour dataset.
GM <- apply(yassour[, -1], 1, function(x) exp(mean(log(x[x != 0]))))
phi.Obs <- GM / sum(GM) * 15000
mean(log(phi.Obs))
sd(log(phi.Obs))
ret <- scuo.random(SCUO, meanlog = -0.441473, sdlog = 1.393285)
plotprxy(ret, SCUO)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.