split_phat: Split (windowed) sucess probability

View source: R/performance_metrics.R

split_phatR Documentation

Split (windowed) sucess probability

Description

Computes the average success probability for a number k of windows.

Usage

split_phat(samples, k = 2)

Arguments

samples

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

k

a number of windows into which to break up the samples. Default is k=2.

Details

This function breaks up the samples into k windows computes the average successe probability for each one. Works in the same spirit as split-Rhat and other metrics which compare one part of the chain to the others.

Value

a list of scaled number of state transitions (between 0 and 1) in each of the k windows.

See Also

split_switching_ratio

Examples

X <- rbinom(1E6, size = 1, prob = .2)
split_phat(X, k = 2)
split_phat(X, k = 11)
plot(split_phat(X, k = 200), type = "l")

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