scaled_average_transitions: Scaled average state changes.

View source: R/performance_metrics.R

scaled_average_transitionsR Documentation

Scaled average state changes.

Description

Scaled average state changes.

Usage

scaled_average_transitions(samples, p = NULL)

Arguments

samples

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

p

(optional) marginal success probability.

Details

The function computes the mean number of state changes, y.hat = Sy/N, where Sy is the sum of state changes and N is the total number of iterations. The function then returns y.hat scaled by its maximum theoretical value given p. If p is not known (p = NULL) then the sample mean, mean(samples) is used as an estimate.

Value

normalised number of state transitions (changes).

See Also

MC_neff scaled_alpha switching_ratio


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