Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.stationary

Logical Check of Stationarity


Description

This function returns TRUE if the object is stationary according to the Geweke.Diagnostic function, and FALSE otherwise.

Usage

is.stationary(x)

Arguments

x

This is a vector, matrix, or object of class demonoid.

Details

Stationarity, here, refers to the limiting distribution in a Markov chain. A series of samples from a Markov chain, in which each sample is the result of an iteration of a Markov chain Monte Carlo (MCMC) algorithm, is analyzed for stationarity, meaning whether or not the samples trend or its moments change across iterations. A stationary posterior distribution is an equilibrium distribution, and assessing stationarity is an important diagnostic toward inferring Markov chain convergence.

In the cases of a matrix or an object of class demonoid, all Markov chains (as column vectors) must be stationary for is.stationary to return TRUE.

Alternative ways to assess stationarity of chains are to use the BMK.Diagnostic or Heidelberger.Diagnostic functions.

Value

is.stationary returns a logical value indicating whether or not the supplied object is stationary according to the Geweke.Diagnostic function.

Author(s)

See Also

Examples

library(LaplacesDemon)
is.stationary(rnorm(100))
is.stationary(matrix(rnorm(100),10,10))

LaplacesDemon

Complete Environment for Bayesian Inference

v16.1.4
MIT + file LICENSE
Authors
Byron Hall [aut], Martina Hall [aut], Statisticat, LLC [aut], Eric Brown [ctb], Richard Hermanson [ctb], Emmanuel Charpentier [ctb], Daniel Heck [ctb], Stephane Laurent [ctb], Quentin F. Gronau [ctb], Henrik Singmann [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.