Growth.iid: Compute the stochastic growth rate in an iid stochastic...

Description Usage Arguments Examples

Description

Compute the stochastic growth rate in an iid stochastic environment

Usage

1
  Growth.iid(matrices, p, t.max)

Arguments

matrices

list of matrices or a d^2 x s matrix, where d number of stages, s the number of matrixes

p

vector of probabilities for drawing each matrix

t.max

timeframe over which to compute growth rate

Examples

1
2
3
4
5
6
7
8
A1 = matrix(c(0,1,.5,0), nrow=2)
A2 = matrix(c(0,2,.5,0), nrow=2)
A3 = matrix(c(0,7,.5,0), nrow=2)
## d=2 stages, to generating appropriate d^2 by 3 matrix for input...
d = 2
mats = c(A1, A2, A3) # s = 3
dim(mats) = c(d^2, length(mats)/d^2)
Growth.iid(mats, rep(1/3, 3), 10)

ashander/matrixmodels documentation built on May 12, 2019, 4:40 a.m.