plot_series: Series Plotter

View source: R/calc_functions.R

plot_seriesR Documentation

Series Plotter

Description

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)

Usage

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]])

samplr documentation built on April 4, 2025, 12:30 a.m.