acf: autocorrelation function for time series
Usage
acf(x, lag.max, type = "correlation", plot = FALSE)
Arguments
x
a time series, vector or matrix
lag.max
maximum lag at which to calculate acf
type
by default an autocorrelation function is calculated.
If type="covariance" the autocovariance function is calculated.
Partial correlations are not implemented
plot
flag for S-PLUS compatibility. Ignored
Value
- A list with the following elements:
- acfAutocorrelation function
- lagLag values at which acf is calculated
- n.usedNumber of observations used in calculation
- typeSee above
- seriesName of time series used as input
notes
An attempt to re-implement the S-PLUS acf function. Still
lacking in some features of the S-PLUS version.