autcor | R Documentation |
Estimate autocovariances and autocorrelations.
autcor(y, lag = NULL, plot = TRUE, lag_axis = TRUE)
y |
a univariate time series. |
lag |
maximum lag. Default is |
plot |
logical. If |
lag_axis |
logical. If |
acov |
autocovariances. |
acor |
autocorrelations (normalized covariances). |
mean |
mean of |
H.Akaike and T.Nakagawa (1988) Statistical Analysis and Control of Dynamic Systems. Kluwer Academic publishers.
# Example 1 for the normal distribution
y <- rnorm(200)
autcor(y, lag_axis = FALSE)
# Example 2 for the ARIMA model
y <- arima.sim(list(order=c(2,0,0), ar=c(0.64,-0.8)), n = 200)
autcor(y, lag = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.