switching_ratio: Scaled number of state changes

View source: R/performance_metrics.R

switching_ratioR Documentation

Scaled number of state changes

Description

Computes the ratio between the number of observed state changes and the maximum possible number of state changes given the observed occupation time.

Usage

switching_ratio(samples)

Arguments

samples

a collection of N samples from a two-state Markov chain.

Details

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.

Value

scaled number of state transitions (between 0 and 1).

See Also

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)


maxbiostat/BinaryMarkovChains documentation built on Dec. 11, 2023, 4:29 a.m.