0
$\begingroup$

I am really confused when reading PACF and ACF plots on a small example dataset I created. I created a vector containing a linear trend (1:100) and added normally distributed numbers to it to include some jitter:

set.seed(12345)
random_component = rnorm(100)
trend = 1:100 + random_component
plot(trend)

enter image description here

I then created the ACF and PACF Functions for the normal data and the data after differenciating. The ACF function for the regular data is slowly decreasing and the PACF function is showing a peak at lag 1 - not surprising this indicates a trend.

par(mfrow=c(2,2))
acf(trend)
pacf(trend)
acf(diff(trend))
pacf(diff(trend))

But here's what I don't understanding: After differenciating the data I assume that I should have removed the trend component and should get PACF and ACF functions with no significant peaks. But both the ACF and PACF function of diff(trend) show multiple significant peaks.

Can anyone give me a hint on this?

enter image description here

Best regards and thanks for your help.

$\endgroup$
2
$\begingroup$

Differencing not only removed the trend but also created a pattern of integrated moving average of order one, MA(1). Your data was generated as

$$ x_t = t + \varepsilon_t $$

where $\varepsilon_t \overset{iid}\sim N(0,1)$.

After differencing that becomes

$$ \Delta x_t = (t+\varepsilon_t)-(t-1+\varepsilon_{t-1}) = 1 + \varepsilon_t-\varepsilon_{t-1}. $$

As @ChristophHanck correctly notes,

the ACF of an MA(1) cuts off after the first lag, while its PACF decays to zero gradually - so the simulated behavior is precisely what was to be expected.

$\endgroup$
  • $\begingroup$ +1 ... and the ACF of an MA(1) cuts off after the first lag, while its PACF decays to zero gradually - so the simulated behavior is precisely what was to be expected. $\endgroup$ – Christoph Hanck Jan 26 '16 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.