算法手册/ 计量经济研究/ 面板单位根检验

面板单位根检验

计算公式

符号

符号含义
yit个体 i 在 t 期的序列值
ρi个体 i 的自回归系数
Δyit一阶差分 yit − yi,t−1
ti个体 i 的 ADF t 统计量
t̄个体 t 统计量的平均
E(t̄)、V(t̄)IPS 校正表的均值与方差
N、T个体数与期数
μ、σ*LLC 的均值与方差校正值
ρ̂合并回归得到的共同自回归系数
tρ共同系数的 t 统计量 ρ̂/SE(ρ̂)
S̄N逐个体长期标准差与残差标准差之比的均值
σ̂ε2合并回归的残差方差
T̄平均有效期数:T 减去平均滞后阶数再减 1

核心公式

公式 (1.1):逐个体 ADF 回归
\[ \Delta y_{it}=\alpha_i+\rho_i y_{i,t-1}+\sum_{j=1}^{p_i}\phi_{ij}\Delta y_{i,t-j}+e_{it} \]
公式 (1.2):IPS 的 Ztbar 统计量
\[ Z_{\bar{t}}=\frac{\sqrt{N}\left(\bar{t}-E(\bar{t})\right)}{\sqrt{V(\bar{t})}},\qquad \bar{t}=\frac{1}{N}\sum_{i=1}^{N}t_i \]
公式 (1.3):LLC 的共同系数统计量
\[ z=\frac{t_{\rho}-N\bar{T}\bar{S}_{N}\hat{\sigma}_{\varepsilon}^{-2}\,\mathrm{SE}(\hat{\rho})\,\mu}{\sigma^{*}},\qquad t_{\rho}=\frac{\hat{\rho}}{\mathrm{SE}(\hat{\rho})} \]

参考文献

  1. Im, K. S., Pesaran, M. H., & Shin, Y. (2003). Testing for unit roots in heterogeneous panels. Journal of Econometrics, 115(1), 53–74.
  2. Levin, A., Lin, C.-F., & Chu, C.-S. J. (2002). Unit root tests in panel data: Asymptotic and finite-sample properties. Journal of Econometrics, 108(1), 1–24.
  3. MacKinnon, J. G. (1996). Numerical distribution functions for unit root and cointegration tests. Journal of Applied Econometrics, 11(6), 601–618.

算法参数

参数取值默认影响
检验类型 ips / llc / fisher / all ips+llc 决定输出哪些检验;本页给出 IPS 与 LLC。
确定性项 intercept / trend / none intercept ADF 回归是否含常数项与线性趋势。
滞后阶数 自动(Hall / AIC / SIC)或固定阶数 自动(SIC) 逐个体按所选定阶法在 0~pmax 间定阶;BIC 与 SIC 同口径,改变 ADF 的 t 值与 p。
最大滞后阶数 非负整数 2 自动定阶的上限,仅在自动档生效。
长期方差带宽 正整数,留空自动 round(3.21·T^(1/3)) LLC 长期方差核估计的带宽。

验证报告

数据与 R 版本

数据文件 panel_unit_root.csv
样本与变量 10 个个体 × 10 期 = 100 条;序列变量 Y(含个体均值与 AR(1) 成分)
R 包 plm 2.6.7

提示词

以 Y 为序列、ID 为个体、TIME 为时期,在包含截距项的设定下做面板单位根检验,同时报告 IPS(Ztbar) 与 LLC,滞后阶数按 SIC 自动选择、上限 2 阶。

R 代码

library(plm)
d <- read.csv("panel_unit_root.csv")
ips <- purtest(Y ~ 1, data = d, index = c("ID", "TIME"), test = "ips",
               exo = "intercept", lags = "SIC", pmax = 2, ips.stat = "Ztbar")
llc <- purtest(Y ~ 1, data = d, index = c("ID", "TIME"), test = "levinlin",
               exo = "intercept", lags = "SIC", pmax = 2)
cat("IPS Ztbar", ips$statistic$statistic, "p", ips$statistic$p.value, "\n")
cat("LLC z", llc$statistic$statistic, "p", llc$statistic$p.value, "\n")
detail <- data.frame(ID = 1:10,
                     lag = sapply(ips$idres, `[[`, "lags"),
                     rho = sapply(ips$idres, function(z) as.numeric(z$rho)),
                     trho = sapply(ips$idres, function(z) as.numeric(z$trho)),
                     p = sapply(ips$idres, function(z) as.numeric(z$p.trho)))
print(detail, digits = 15)

对比结果

指标SPSSAUR差值
IPS Ztbar 统计量−2.6034710663−2.60347100006.63e−8
IPS p 值0.00461425280.00461425302e−10
LLC z 统计量−3.5116756776−3.51167600003.22e−7
LLC p 值0.00022264550.00022264550
个体 1 的 rho−0.3902236150−0.39022361503.17e−11
个体 2 的 rho−0.6394613530−0.63946135302.59e−11
个体 3 的 rho−0.5036862340−0.50368623404.14e−11
个体 4 的 rho−1.2234040248−1.22340402482.72e−11
个体 5 的 rho−0.2433484565−0.24334845653.67e−13
个体 6 的 rho−1.9719756517−1.97197565172.69e−11
个体 7 的 rho−0.6318581268−0.63185812684.99e−11
个体 8 的 rho−1.1551016338−1.15510163384.86e−11
个体 9 的 rho−0.3442004041−0.34420040412.56e−11
个体 10 的 rho−0.3430921942−0.34309219424.2e−11
个体 4 的 trho−3.9084111335−3.90841113352.22e−11
个体 6 的 trho−4.6783750386−4.67837503861.18e−11
个体 8 的 trho−3.5127796478−3.51277964781.38e−11

结论:IPS 的 Ztbar 与 p、LLC 的 z 与 p、以及 10 个个体的 rho 与代表个体的 trho 均与 R 的 plm::purtest 一致,按 10 位小数逐位相同。两种检验都在 0.05 水平拒绝「所有个体存在单位根」,该序列可视为平稳;plm 在本数据上给出「时间序列较短」的提示,属样本长度提醒,不影响逐位一致性。

操作手册 问题反馈

引用SPSSAU. 面板单位根检验:计算公式与参数[EB/OL]. SPSSAU算法手册, 2026-11-20. https://www.spssau.com/algorithm/econometrics/panel_unit_root.html.