Markovmoments: Markovmoments

Description Usage Arguments Value Examples

View source: R/stochastic_growth_model.R

Description

The function Markovmoments computes the expectation, variance, autocovariance and autocorrelation of a Markov process.

Usage

1
Markovmoments(states, ptm, ...)

Arguments

states

A numerical vector with the states of the Markov process.

ptm

The probability transition matrix, a square matrix of dimension length(states) whose columns sum to one.

...

Additional arguments.

Value

It returns a list containing:

Expectation

The mean of the process.

Variance

The variance of the process.

Autocovariance

The autocovariance of the process.

Autocorrelation

The autocorrelation of the process.

Stationary distribution

The stationary distribution of the process, used for the computation of the moments.

Examples

1
2
3
4
a <- c(-1, 1)
A <- matrix(c(0.5, 0.6,
              0.5, 0.4), 2, 2)
Markovmoments(a, A)

sgmodel documentation built on Feb. 27, 2020, 5:06 p.m.