MCEstimation: A function to estimate the transition matrix for a discrete time Markov chain.
Description
This function estimates the transition matrix for a discrete time Markov chain with state space 0,1,..,n given a realisation. The chain has n+1 states.
Usage
MCEstimation(statehist,n)
Arguments
statehist
the realisation of the chain.
n
the highest numbered state.
Value
Returns the empirical transition matrix obtained by calculating the observed frequencies of actual transitions in the realisation.\
Details
We assume that the state space is 0,1,2...,n. n is assumed known as it cannot be reliably infered from the realisation.
References
Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction
to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.