Reader small image

You're reading from  Hands-On Time Series Analysis with R

Product typeBook
Published inMay 2019
Reading LevelBeginner
PublisherPackt
ISBN-139781788629157
Edition1st Edition
Languages
Right arrow
Author (1)
Rami Krispin
Rami Krispin
author image
Rami Krispin

Rami Krispin is a data scientist at a major Silicon Valley company, where he focuses on time series analysis and forecasting. In his free time, he also develops open source tools and is the author of several R packages, including the TSstudio package for time series analysis and forecasting applications. Rami holds an MA in Applied Economics and an MS in actuarial mathematics from the University of MichiganAnn Arbor.
Read more about Rami Krispin

Right arrow

The partial autocorrelation function

One of the downsides of the autocorrelation function is that it does not remove the effect of lags 1 up to k-1 on the series when calculating the correlation of the series with the k lag. The partial autocorrelation function (PACF), the sister function of the ACF, provides a solution for this by computing the conditional correlation of the series with the k lag given the relationship of the 1, 2, ..., and k-1 lags with the series. In other words, the PACF provides an estimation for the direct correlation of the series with the k lag after removing the correlation of the k lag with the previous lags. The pacf function from the stats package provides an estimation for the PACF values for a given input. Let's review the PACF output for the first 60 lags of the USgas dataset:

pacf(USgas, lag.max = 60) 

We will get the following plot:

Both...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Time Series Analysis with R
Published in: May 2019Publisher: PacktISBN-13: 9781788629157

Author (1)

author image
Rami Krispin

Rami Krispin is a data scientist at a major Silicon Valley company, where he focuses on time series analysis and forecasting. In his free time, he also develops open source tools and is the author of several R packages, including the TSstudio package for time series analysis and forecasting applications. Rami holds an MA in Applied Economics and an MS in actuarial mathematics from the University of MichiganAnn Arbor.
Read more about Rami Krispin