Learn R Programming

markovchain (version 0.6)

verifyMarkovProperty: Various functions to perform statistical inference of DTMC

Description

These functions verify the Markov property, assess the order and stationarity of the Markov chain.

Usage

verifyMarkovProperty(sequence, ...)
assessOrder(sequence)
assessStationarity(sequence, nblocks)
divergenceTest(sequence, hypothetic)

Arguments

sequence
An empirical sequence.
...
Parameters for chi-square test.
nblocks
Number of blocks.
hypothetic
A transition matrix for a hypothetic markov chain sequence.

Value

Verification result

References

Monika, Anderson and Goodman.

See Also

markovchain

Examples

Run this code
sequence <- c("a", "b", "a", "a", "a", "a", "b", "a", "b",
              "a", "b", "a", "a", "b", "b", "b", "a")
mcFit <- markovchainFit(data = sequence, byrow = FALSE)
verifyMarkovProperty(sequence)
assessOrder(sequence)
assessStationarity(sequence, 1)
divergenceTest(sequence, mcFit$estimate@transitionMatrix)

Run the code above in your browser using DataLab