plot_sigma_scaling: Sigma Scaling Plotter

Description Usage Arguments Details Value Examples

View source: R/plotters.R

Description

Plots a scaling of the sd in the distribution of price changes across time lags and returns the value of the slope

Usage

1

Arguments

chain

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

plot

Boolean. Whether to return a plot or the elements used to make it.

Details

Markets show sigma scaling exponents around 0.5.

Value

If plot is true, a sigma scaling plot. If false, a vector with the standard deviations at each lag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
target <- distr::Norm()
pd_func <- make_distr_pdf(target)
chain1 <- sampler_mcmc(pd_func, 0, sigma_prop = 1)
plot_sigma_scaling(chain1[[1]])

set.seed(1)
target <- distr::Norm()
pd_func <- make_distr_pdf(target)
chain1 <- sampler_mcmc(pd_func, 0, sigma_prop = 1)
plot_sigma_scaling(chain1[[1]], plot = FALSE)

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