cond_ev: Conditional expectation of next step of process

Description Usage Arguments Value Functions Examples

View source: R/means_variances.R

Description

Conditional expectation of next step of process

Usage

1
2
3
4
5
cond_ev(Y, lambda = parms$lambda, birth = parms$birth,
  death = parms$death, tran = parms$tran, parms, verbose = FALSE)

cond_ev_k(k, Y, lambda = parms$lambda, birth = parms$birth,
  death = parms$death, tran = parms$tran, parms, verbose = FALSE)

Arguments

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

Value

conditional expectation at time t+1

Functions

Examples

 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)

gmonette/Tcells2 documentation built on May 17, 2019, 7:25 a.m.