Markovmoments {sgmodel} | R Documentation |
Markovmoments
Description
The function Markovmoments
computes the expectation, variance, autocovariance and autocorrelation of a Markov process.
Usage
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
a <- c(-1, 1)
A <- matrix(c(0.5, 0.6,
0.5, 0.4), 2, 2)
Markovmoments(a, A)
[Package sgmodel version 0.1.2 Index]