Plots the value of a one-dimensional series against the iteration where it occurred. Useful to see the general pattern of the chain (white noise, random walk, volatility clustering)

plot_series(chain, change = FALSE)

Arguments

chain

Vector of n length, where n is the number of trials or sampler iterations

change

Boolean. Whether to plot the series of values or the series of changes between values.

Value

A series plot

Examples

set.seed(1)
chain1 <- sampler_mh(1, "norm", c(0,1), diag(1))
plot_series(chain1[[1]])