compute_stationarity_BF: Compute the Bayes factor testing stationarity of a Markov...

View source: R/stationarity.R

compute_stationarity_BFR Documentation

Compute the Bayes factor testing stationarity of a Markov chain.

Description

Compute the Bayes factor testing stationarity of a Markov chain.

Usage

compute_stationarity_BF(seq, L = 10, states = NULL)

Arguments

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 NULL, will be deduced from 'seq'.

Value

the approximate Bayes factor testing H1 = not stationary vs H0 = stationary.

Examples

X <- rbinom(n = 1E5, size = 1, prob = 0.8)
compute_stationarity_BF(X)

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