powered by
The function Markovmoments computes the expectation, variance, autocovariance and autocorrelation of a Markov process.
Markovmoments
Markovmoments(states, ptm, ...)
It returns a list containing:
The mean of the process.
The variance of the process.
The autocovariance of the process.
The autocorrelation of the process.
The stationary distribution of the process, used for the computation of the moments.
A numerical vector with the states of the Markov process.
The probability transition matrix, a square matrix of dimension length(states) whose columns sum to one.
Additional arguments.
a <- c(-1, 1) A <- matrix(c(0.5, 0.6, 0.5, 0.4), 2, 2) Markovmoments(a, A)
Run the code above in your browser using DataLab