View source: R/performance_metrics.R
switching_ratio | R Documentation |
Computes the ratio between the number of observed state changes and the maximum possible number of state changes given the observed occupation time.
switching_ratio(samples)
samples |
a collection of N samples from a two-state Markov chain. |
This index is similar to scaled_average_transitions
but
does not require any knowledge about any of the Markov chain parameters.
On the other hand, it is computed conditional on the observed occupation time and thus inherits its uncertainty.
scaled number of state transitions (between 0 and 1).
split_switching_ratio
MC_neff
scaled_alpha
scaled_average_transitions
@examples
X1 <- c(0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)
X2 <- c(0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0)
switching_ratio(X1)
switching_ratio(X2)
switching_ratio(X11:8)
switching_ratio(X19:16)
switching_ratio(X21:8)
switching_ratio(X29:16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.