stationary_distribution: Stationary distribution

View source: R/stationary_distribution.R

stationary_distributionR Documentation

Stationary distribution

Description

This function computes the stationary distribution corresponding to a transition probability matrix.

Usage

stationary_distribution(tpm, soft_fail = FALSE)

Arguments

tpm

[matrix()]
A transition probability matrix.

soft_fail

[logical(1)]
Return the discrete uniform distribution if the computation of the stationary distribution fails for some reason? Else, throw an error.

Value

A numeric vector.

See Also

Other matrix helpers: check_correlation_matrix(), check_covariance_matrix(), check_transition_probability_matrix(), cov_to_chol(), diff_cov(), insert_matrix_column(), matrix_diagonal_indices(), matrix_indices(), sample_correlation_matrix(), sample_covariance_matrix(), sample_transition_probability_matrix()

Examples

tpm <- matrix(0.05, nrow = 3, ncol = 3)
diag(tpm) <- 0.9
stationary_distribution(tpm)

oeli documentation built on Oct. 16, 2024, 5:08 p.m.