| acf_vec | R Documentation |
Estimate the sample autocorrelation function of a numeric vector.
acf_vec(x, lag_max = 24, ...)
x |
Numeric vector. |
lag_max |
Integer. Maximum lag for which the autocorrelation is estimated. |
... |
Further arguments passed to |
acf_vec() is a small wrapper around stats::acf(). It returns
the sample autocorrelations as a numeric vector and removes lag 0 from the
output, because lag 0 is always equal to 1 and is usually not needed for
diagnostics.
A numeric vector containing the sample autocorrelations for lags
1 to lag_max.
Other data analysis:
estimate_acf(),
estimate_kurtosis(),
estimate_mode(),
estimate_pacf(),
estimate_skewness(),
pacf_vec(),
summarise_data(),
summarise_split(),
summarise_stats()
library(dplyr)
x <- M4_monthly_data |>
filter(series == first(series)) |>
pull(value)
acf_vec(
x = x,
lag_max = 12
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.