Description Usage Arguments Value Examples
A wrapper for the acf
function from the stats package that
extracts only the temporal autocorrelation at a lag of one timestep (which is
the type of temporal autocorrelation that this package simulates). The function omits
NA values in the time series.
1 | autocorrelation(x, biasCorrection = TRUE)
|
x |
A numeric vector. |
biasCorrection |
Autocorrelation estimates are biased for short time series. The function can correct for this bias in the manner proposed by Quenouille (1949). Set to TRUE by default. |
A single numeric value: the estimate of the temporal autocorrelation with a lag of 1.
1 2 | rednoise <- colored_noise(timesteps = 50, mean = 0.5, sd = 0.2, phi = 0.3)
autocorrelation(rednoise)
|
[1] 0.3783374
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.