compute_Hsquared | R Documentation |
seq
to a nonstationary modelCompute the likelihood ratio statistic comparing a stationary Markov chain model for seq
to a nonstationary model
compute_Hsquared(seq, L = 10, states = NULL, eps = 1e-17)
seq |
a vector containing observations from an stochastic process. |
L |
an integer specifying how many windows will be compared |
states |
the possible states of the Markov chain. If |
eps |
a small number to avoid zero probabilities |
a likelihood ratio statistic comparing H1 = not stationary vs H0 = stationary.
X <- rbinom(n = 1E5, size = 1, prob = 0.8)
compute_Hsquared(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.