Description Usage Arguments Value Examples
View source: R/means_variances.R
Simulation sequence
1 2 3 |
N |
number of steps to simulate |
Y |
vector of cell counts at time t |
lambda |
autonomous rate of cell formation for first cell type per unit of time |
birth |
vector for each type of cell with proportions of cells that replicate per unit of time |
death |
vector for each type of cell with proportions of cells that die per unit of time |
tran |
vector of length equal to length(Y) -1 with proportions of cells that transform to the next cell type per unit of time |
parms |
option list with parameters lambda, birth, death and tran |
verbose |
(default FALSE) print additional output for debugging |
sequence of randomly generated values at times t+1, ..., t+N
1 2 3 4 5 6 7 8 | ## Not run:
parms <- list(lambda=10, birth = c(.01,.02,.01), death = .03, tran = c(.02, .04))
matplot(sim_seq(N = 50, parms = parms), type = 'l', lty = c(1,2,3), lwd = 2, col = c('black','red','green'))
legend("right", inset=.05, legend=c("1", "2", "3"), lty = c(1,2,3), lwd = 2, col = c('black','red','green') , horiz=TRUE)
matplot(sim_seq(N = 1000, parms = parms), type = 'l', lty = c(1,2,3), lwd = 2, col = c('black','red','green'))
legend("right", inset=.05, legend=c("1", "2", "3"), lty = c(1,2,3), lwd = 2, col = c('black','red','green') , horiz=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.