Learn R Programming

LaplacesDemon (version 16.1.0)

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.

Value

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

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.

See Also

BMK.Diagnostic, Geweke.Diagnostic, Heidelberger.Diagnostic, and LaplacesDemon.

Examples

Run this code
# NOT RUN {
library(LaplacesDemon)
is.stationary(rnorm(100))
is.stationary(matrix(rnorm(100),10,10))
# }

Run the code above in your browser using DataLab