# PACF manual calculation

I am trying to replicate the calculation that SAS and SPSS do for the partial autocorrelation function (PACF). In SAS it is produced through Proc Arima. The PACF values are the coefficients of an autoregression of the series of interest on lagged values of the series. My variable of interest is sales so I calculate lag1, lag2...lag12 and I run the following OLS regression:

$$Y_t=a_0+a_1Y_{t-1}+a_2Y_{t-2}+a_3Y_{t-3}+\ldots+a_{12}Y_{t-12}.$$

Unfortunately the coefficients that I get are not even close to the PACF (lags 1 to 12) that SAS or SPSS provide. Any suggestions? Is there something wrong? What comes to my mind is that the least squares estimation of this model might not be appropriate and maybe another estimation technique should be used.

• Is $a_{12}$ correct, by any chance?
– whuber
Nov 18, 2011 at 19:16

As you said "The PACF values are the coefficients of an autoregression of the series of interest on lagged values of the series" and I add where the PACF(K) is the coefficient of the last (kth) lag. Thus to compute the PACF of lag 3 for example compute $$Y_{t}= a_{0}+ a_{1}Y_{t−1}+ a_{2}Y_{t−2}+ a_{3}Y_{t−3}$$

and $a_{3}$ is the PACF(3).

Another example. To compute the PACF(5), estimate

$$Y_{t}= a_{0}+ a_{1}Y_{t−1}+ a_{2}Y_{t−2}+ a_{3}Y_{t−3}+ a_{4}Y_{t-4}+ a_{5}Y_{t-5}$$

and $a_{5}$ is the PACF(5).

In general the PACF(K) is the KTH order coefficient of a model terminating with lag K. By the way SAS and other software vendors use the Yule-Walker approximation to compute the PACF which will provide slightly different estimates of the PACF. They do this for computational efficiency and in my opinion to duplicate the results in standard textbooks.

• +1. If you're unfamiliar with $\TeX$, a good way to use it anyway is to right-click on relevant expressions in the question, choose "Show Source," then copy and paste them into your answer. You can then make modifications, which usually are intuitive and obvious. This will make your replies more readable.
– whuber
Nov 18, 2011 at 23:04
• Got it! Excellent explanation one more time. Thanks very much! Nov 18, 2011 at 23:24
• I realize this was written long ago, but is one of the few references of calculating PACF as "coefficients of an autoregression of the series of interest on lagged values of the series" I am finding. I see it in the implementation of statsmodels.tsa.stattools.pacf - tedboy.github.io/statsmodels_doc/_modules/statsmodels/tsa/…. Wikipedia lists 3 ways to calculate partial correlation: a) using linear regression and correlating residuals b) recursive and c) matrix inversion. But what is the theoretical basis here? Mar 26, 2020 at 19:48