AutoCorr | R Documentation |
Calculates the AutoCorrelation function
AutoCorr(TimeSeries, nLags = 2, PlotIt = FALSE,...)
TimeSeries |
A numeric time series object, or a numeric vector/matrix. |
nLags |
Number of lags. Default is 2. |
PlotIt |
Boolean, TRUE if auto correlation plot should be printed, FALSE else. Default is FALSE. |
... |
further arguments passed on to output of |
Calculation is based on the sample covariance. For further details see acf
.
List with
acf |
A three dimensional array containing the estimated acf. |
type |
"Correlation". |
n.used |
The number of observations in the time series. |
lag |
A three dimensional array containing the lags at which the acf is estimated. |
series |
Name of time series |
snames |
The series names for a multivariate time series. NULL for univariate time series. |
Michael Thrun
data("ElectricityBRD")
res = AutoCorr(ElectricityBRD$Mrd_KWh, nLags = 5, PlotIt = TRUE, main="Electricity production in BRD in Mrd KWh")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.