acf_by_block | R Documentation |
This original version of this function was written by Stacy DeRuiter. It computes the ACF of a vector passed as input, ignoring time lags that overlap blocks (i.e., time series).
acf_by_block(x, blocks, lag_max = NULL, make_plot = TRUE, ...)
x |
Numeric vector |
blocks |
Vector of indices of blocks, of same length as x |
lag_max |
Maximum lag at which to calculate the ACF. Defaults to the length of the shortest block. |
make_plot |
Logical: should the ACF be plotted? Defaults to TRUE. |
Vector of ACF at each time lag
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.