stationary: Stationary Distribution of a Transition Matrix

Description Usage Arguments Value Author(s) Examples

View source: R/C2pop.R

Description

This auxiliary function determines the stationary distribution from a transition matrix.

Usage

1

Arguments

P

a transition matrix, i.e., a square matrix where all rows sum to 1.

Value

the stationary probability vector.

Author(s)

Leonhard Held

Examples

1
2
3
4
5
Cgrouped_norm <- contactmatrix(normalize = TRUE)
Cgrouped_norm
(p <- stationary(Cgrouped_norm))
(Cpowered <- make_powerC(Cgrouped_norm)(1e6))
stopifnot(all.equal(Cpowered[1,], p))

hhh4contacts documentation built on July 4, 2017, 9:44 a.m.