Description Usage Arguments Value Functions Examples
View source: R/means_variances.R
Conditional expectation of next step of process
1 2 3 4 5 |
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 |
k |
number of steps for conditional expectation |
conditional expectation at time t+1
cond_ev_k
: Conditional expectation in k steps of the process
1 2 3 4 5 6 7 8 9 10 11 12 | cond_ev(c(100,100,100), 10, .01, .03, c(.01,.02))
parms <- list(lambda = 10, birth = rep(.01,3),
death = .03, tran = c(.01,.02))
cond_ev(c(100,100,100), parms = parms)
Nsteps <- 2000
mat <- matrix(NA, 3, Nsteps)
mat[,1] <- c(100,100,100)
for ( i in 2:Nsteps) mat[,i] <- cond_ev(mat[,i-1],parms = parms)
# Equilibrium profile with these parameters:
head(t(mat),10)
tail(t(mat),10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.