Acf
computes (and by default plots) an estimate of the autocorrelation function of a univariate time series. Function Pacf
computes (and by default plots) an estimate of the partial autocorrelation function of a univariate time series.Acf(x, lag.max=NULL, type=c("correlation", "partial"),
plot=TRUE, main=NULL, xlim=NULL, ylim=NULL, xlab="Lag", ylab=NULL,
na.action=na.contiguous, ...)
Pacf(x, main=NULL, ...)
taperedacf(x, lag.max=NULL, type=c("correlation", "partial"),
plot=TRUE, calc.ci=TRUE, level=95, nsim=100,
xlim=NULL, ylim=NULL, xlab="Lag", ylab=NULL, ...)
taperedpacf(x, ...)
correlation
" (the default) or "partial
".na.contiguous
. Useful alternatives are na.pass
and na.
TRUE
, confidence intervals for the ACF/PACF estimates are calculated.acf
or to the plotting function.Acf
and Pacf
functions return objects of class "acf" as described in acf
from the stats package. The taperedacf
and taperedpacf
functions return objects of class "mpacf".acf
and pacf
functions when applied to univariate time series. The main differences are that Acf
does not plot a spike at lag 0 (which is redundant) and the horizontal axes show lags in time units rather than seasonal units.The tapered versions implement the ACF and PACF estimates and plots described in Hyndman (2015), based on the banded and tapered estimates of autocovariance proposed by McMurry and Politis (2010).
McMurry, T. L., & Politis, D. N. (2010). Banded and tapered estimates for autocovariance matrices and the linear process bootstrap. Journal of Time Series Analysis, 31(6), 471-482.
acf
, pacf
, tsdisplay
Acf(wineind)
Pacf(wineind)
taperedacf(wineind, nsim=50)
taperedpacf(wineind, nsim=50)
Run the code above in your browser using DataLab