A Complete Introduction To Time Series Analysis (with R):: Estimating Autocorrelation
In the last article, we went over a couple of important properties of the autocovariance function, and in previous articles, we have used multiple times the ggAcf
and ggPacf
functions to plot the ACF and PACF respectively. But how are these actually estimated them, and how do we know that they are being correctly estimated (and hopefully not too off from the truth)? In this short article, we will explain precisely that. Let’s start!
Estimating autocovariance
Suppose that you have some time series with observed values
Then we have the following:
Sample mean
This one is probably not surprising. The interesting one is the following:
Sample autocovariance
further, this implies that
Why is this the case? First recall that the covariance between two vectors U and V is given by
When it comes to the sample version of these estimators, you can think as replacing the expectation operator by some average with the data; so, in this case, we would get
if the lowercase indexed u and v represent the random vector (observed ) components. For time series, however, both “u”…