Tests the null hypothesis that the conditional distribution of the next state depends only on the current state, against a second-order alternative.
Tests whether the sequence is compatible with a first-order Markov chain against a second-order alternative, by testing independence of past and future states conditional on the present state. Degrees of freedom are summed, present-state by present-state, over only the past and future states actually observed with that present state, mirroring the other functions documented on this page.
Tests whether transition probabilities are constant across consecutive blocks. Structural zeros can be supplied explicitly through a logical transition matrix.
verifyMarkovProperty(
sequence,
method = c("G", "Pearson", "simulation"),
B = 9999,
seed = NULL,
verbose = TRUE
)assessOrder(sequence, verbose = TRUE)
verifyEmpiricalToTheoretical(
data,
object,
method = c("G", "Pearson", "simulation"),
B = 9999,
seed = NULL,
verbose = TRUE
)
verifyHomogeneity(
inputList,
method = c("G", "Pearson", "simulation"),
B = 9999,
seed = NULL,
verbose = TRUE
)
assessStationarity(sequence, nblocks, structural.zeros = NULL, verbose = TRUE)
An `htest` object with additional package-specific components.
An `htest` object.
An `htest` object with observed and expected counts.
An `htest` object with pooled and individual transition counts.
An `htest` object.
An empirical sequence.
Test statistic: `"G"`, `"Pearson"`, or `"simulation"`.
Number of Monte Carlo replicates for simulation.
Optional random seed.
Should test results be printed?
An empirical sequence or a matrix of transition counts.
A `markovchain` object specifying theoretical probabilities.
A list whose elements are empirical sequences or matrices.
Number of blocks, at least two.
Optional logical matrix marking impossible transitions.
Anderson, T. W. and Goodman, L. A. (1957). Statistical inference about Markov chains. *The Annals of Mathematical Statistics*, 28(1), 89--110.
Kullback, S., Kupperman, M. and Ku, H. H. (1962). Tests for Contingency Tables and Markov Chains. *Technometrics*, 4(4), 573--608.
Anderson, T. W. and Goodman, L. A. (1957). Statistical inference about Markov chains. *The Annals of Mathematical Statistics*, 28(1), 89--110.