序列相关性分析——偏自相关函数
文章来自微信公众号“科文路”,欢迎关注、互动。转发须注明出处。
该文章属于“时间序列分析”系列文章,是之前在校阶段的学习总结。为避免翻译歧义,采用英文写作。当前主题分为三个部分,自协方差、自相关函数、偏自相关函数。
In time series analysis, we should always focus on the correlation itself. Because there exists no other series to compare, we define autocovariance, autocorrelation function and partial autocorrelation function based on the characteristics of the time series.
Word auto means we do the analysis on itself.
3 Partial Autocorrelation Function (PACF)
/wiki/Partial_autocorrelation_function
3.1 Introduction
The result of ACF actually is not the pure correlation of $X(t)$ and $X(t-k)$, because $X(t)$ will also be influenced by the variables between.
In time series analysis, the partial autocorrelation function (PACF) gives the partial correlation of a stationary time series with its own lagged values, regressed the values of the time series at all shorter lags. It contrasts with the autocorrelation function, which does not control for other lags.
3.2 Definition
The partial autocorrelation function (PACF) of a stationary process, $x_t$, denoted $\phi_{h}^{h}\left(\text { or } \phi_{h h}\right)$, for$h=1,2, \dots$ is
$$
\phi_{11}=\operatorname{corr}\left(x_{t+1}, x_{t}\right)=\rho(1)
$$
and
$$
\phi_{h h}=\operatorname{corr}\left(x_{t+h}-\hat{x}{t+h}, x{t}-\hat{x}_{t}\right), \quad h \geq 2
$$
3.3 Calculation
$$
\begin{aligned}\phi(k)&=\frac{E\left(X_{t}-E X_{t}\right)\left(X_{t-k}-E X_{t-k}\right)}{\sqrt{E\left(X_{t}-E X_{t}\right)^{2}} \sqrt{E\left(X_{t-k}-E X_{t-k}\right)^{2}}}\&=\frac{\operatorname{cov}\left[\left(X_{t}-\overline{X}{t}\right),\left(X{t-k}-\overline{X}{t-k}\right)\right]}{\sqrt{\operatorname{var}\left(X{t}-\overline{X}{t}\right) )} \sqrt{\operatorname{var}\left(X{t-k}-\overline{X}_{t-k}\right)}}\end{aligned}
$$
3.4 Matlab code
Use 3.3, e.g.
1 | phi(4) = cov(p(4:14)-mean(p(4:14)),p(1:11)-mean(p(1:11)) ) / ... |
Or use parcorr()
[pacf,lags,bounds] = parcorr(___)
additionally returns the lag numbers that MATLAB® uses to compute the PACF, and also returns the approximate upper and lower confidence bounds.
都看到这儿了,不如关注每日推送的“科文路”、互动起来~
序列相关性分析——偏自相关函数