plot_autocorr: Autocorrelation Plotter

Description Usage Arguments Details Value Examples

View source: R/plotters.R

Description

Plots the autocorrelation of a given sequence, or of the size of the steps (returns).

Usage

1
plot_autocorr(chain, changeACF = TRUE, alpha = 0.05, lag.max = 100)

Arguments

chain

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

changeACF

Boolean. If true, plot the autocorrelation of the change series. If false, plot the autocorrelation of the given chain.

alpha

Measure of Type I error - defaults to .05

lag.max

Length of the x axis. How far to examine the lags.

Details

Markets display no significant autocorrelations in the returns of a given asset.

Value

An autocorrelation plot

Examples

1
2
3
4
target <- distr::Norm()
pd_func <- make_distr_pdf(target)
chain1 <- sampler_mcmc(pd_func, 0, sigma_prop = 1)
plot_autocorr(chain1[[1]])

lucas-castillo/SampleR documentation built on Jan. 1, 2021, 8:25 a.m.