View source: R/order_selection.r
compute_Gsquared | R Documentation |
seq
Compute the likelihood ratio statistic comparing a second-order to a first-order Markov chain model for seq
compute_Gsquared(seq, states = NULL)
seq |
a vector containing observations from an stochastic process. |
Under the null, G^2 has a chi-square(2) distribution.
the likelihood ratio statistic (G^2) comparing a second-order model to a first-order one.
X <- rbinom(n = 1E5, size = 1, prob = 0.8)
compute_Gsquared(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.