Description Usage Arguments Details Value Examples
Plots the autocorrelation of a given sequence, or of the size of the steps (returns).
1 | plot_autocorr(chain, changeACF = TRUE, alpha = 0.05, lag.max = 100)
|
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. |
Markets display no significant autocorrelations in the returns of a given asset.
An autocorrelation plot
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]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.