get.UD: Find the stationary distribution of the CTMC.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/get.UD.R

Description

Finds the stationary distribution (proportional utilization distribution) implied by a CTMC movement model with a given rate matrix.

Usage

1
get.UD(R,method="lu",maxiter, start, tol)

Arguments

R

Rate matrix with R[i,j] equal to the CTMC rate of movement from raster cell i to neighboring raster cell j. R[i,j]=0 implies that cells i and j are not first order neighbors.

method

Either "lu" (default) or "limit". See Details for a description of the two methods.

start

A value for the starting distribution for the 'limit' method. Defaults to 1/num. cells. Ignored for method='lu'.

maxiter

Total number of iterations for limit method if tolerance not reached first. Defaults to 100. Ignored for method='lu'.

tol

Value used to assess convergence for limit method. If max(abs(pi1-pi0))<tol, limit method has converged. Defaults to sqrt(.Machine$double.eps)

Details

This calculates the stationary distribution of the CTMC. If method="lu", then the method used is the method on pg. 455 of Harrod and Plemmons (1984). If method="limit", then the stationary distribution is approximated by brute-force simulation. If R is a sparse Matrix object, then sparse matrix methods are used, making this calculation extremely efficient.

Value

Vector of the stationary distribution at each raster grid cell

Author(s)

Ephraim M. Hanks

References

Harrod, W. J. & Plemmons, R. J. Comparison of some direct methods for computing stationary distributions of Markov chains. SIAM Journal on Scientific and Statistical Computing, 1984, 5, 453-469

Examples

1
2
3
## For example code, do
##
## > help(ctmcMove)

Example output

Loading required package: raster
Loading required package: sp
Loading required package: Matrix
Loading required package: fda
Loading required package: splines

Attaching package: 'fda'

The following object is masked from 'package:graphics':

    matplot

Loading required package: gdistance
Loading required package: igraph

Attaching package: 'igraph'

The following object is masked from 'package:raster':

    union

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union


Attaching package: 'gdistance'

The following object is masked from 'package:igraph':

    normalize

ctmcmove documentation built on April 20, 2018, 5:03 p.m.