geo_power: Take a Geometric Power of a Matrix

Description Usage Arguments Value

Description

For a matrix M, compute (1-p) ( I + p M + p^2 M^2 + ... ) = (1-p)(I-pM)^-1 . If M is a transition matrix, the result is the distribution after taking a Geometric(p) number of steps.

Usage

1
geo_power(M, p, eps = 1e-08, n = log(eps)/log(p))

Arguments

M

The migration matrix.

p

The parameter in the geometric distribution (must be between 0 and 1).

eps

The numerical tolerance.

n

The number of terms to use, minus one (defaults so that p^n = eps).

Value

A matrix of the same form as M.


petrelharp/landsim documentation built on May 25, 2019, 2:53 a.m.