1 模型说明
对于长面板数据,如果直接回归可能会发生伪回归问题。因而需要对长面板数据中的变量进行单位根检验。如果所有变量都是平稳的,那么可以直接进行面板回归;如果变量不平稳,但是同阶单整(或变量组合后可能构成平稳序列:如三个变量2个2阶单整、1个1阶单整;如三个变量2个1阶单整、1个原序列平稳),那么需要进行协整检验,如果存在协整,那么说明变量之间具有长期均衡关系!
长面板数据的单位根检验方法很多,并没有哪个方法具有绝对优势!因而在实际应用中,可以采用多种方法进行检验,如果其中多数方法拒绝了存在单位根的原假设,就可以认为数据是平稳的!
长面板数据模型处理与时间序列类似,时间节点数充足时才行!
2 长面板数据单位根检验的应用
2.1 数据
我们以中国北京、天津、上海三个地区为例,研究房价、人口与金融机构各项贷款余额之间的关系!
其中,时间跨度为2008年1月至2021年8月,人口的月度数据采用移动用户数来近似。
这里对三个变量的单位根进行检验。
2.2 录入数据
打开数据编辑窗口,将数据从Excel中复制到Stata,注意粘贴时选择“将第一行作为变量名”
2.3 数据预处理
变量重命名,设置面板数据格式:
encode 月份,g(t)
encode 地区,g(id)
xtset id t
rename 商品住宅成交均价 houseprice
rename 移动电话用户数 pop
rename 本外币各项贷款余额 loan
2.4 面板单位根检验
2.4.1 LLC检验
houseprice变量:
xtunitroot llc houseprice,lags(aic 10) demean nocons
xtunitroot llc houseprice,lags(aic 10) demean
xtunitroot llc houseprice,lags(aic 10) demean trend
xtunitroot命令中,参数llc表示单位根检验方法;lags(aic 10)表示最大滞后期为10,并根据aic来确定最优滞后期;demean表示消除截面相关;nocons表示无截距项的形式;trend表示有趋势项的形式。
在三种形式的估计结果中,前两种形式显示存在单位根,包含趋势项的形式显示无单位根。因而houseprice变量是平稳的。
pop变量:
xtunitroot llc pop,lags(aic 10) demean nocons
xtunitroot llc pop,lags(aic 10) demean
xtunitroot llc pop,lags(aic 10) demean trend
xtunitroot llc d.pop,lags(aic 10) demean nocons
按照相同的方法对pop变量进行单位给检验,发现原始变量的三种形式下均存在单位根。所以对pop进行差分后再进行单位根检验,发现变量平稳!(下面仅展示平稳的估计结果)。因而pop变量是1阶单整。
loan变量:
xtunitroot llc loan,lags(aic 10) demean nocons
xtunitroot llc loan,lags(aic 10) demean
xtunitroot llc loan,lags(aic 10) demean trend
xtunitroot llc d.loan,lags(aic 10) demean nocons
按照相同的方法对loan变量进行单位给检验,发现原始变量的三种形式下均存在单位根。所以对loan进行差分后再进行单位根检验,发现变量平稳!(下面仅展示平稳的估计结果)。因而loan变量是1阶单整。
2.4.2 其他面板单位根检验方法!
面板单位根检验方法并不是只有LLC一种,且LLC也不一定是首选的方法!除此之外,还有ht、ips、fisher等方法,stata命令与llc基本一致!下面仅列出ht、ips和fisher单位根检验方法对houseprice变量的平稳性检验,不再展示估计结果!
ht方法(不需要指定最大滞后期数):
xtunitroot ht houseprice, demean nocons
xtunitroot ht houseprice, demean
xtunitroot ht houseprice, demean trend
ips方法(不能加nocons参数):
xtunitroot ips houseprice ,lags(aic 10) demean
xtunitroot ips houseprice ,lags(aic 10) demean trend
fisher方法(需要指定dfuller或者pperron;需要自己指定滞后期数;不能加nocons参数):
xtunitroot fisher loan, dfuller lags(3) demean
xtunitroot fisher loan, dfuller lags(3) demean trend
xtunitroot fisher loan, pperron lags(3) demean
xtunitroot fisher loan, pperron lags(3) demean trend
2.5 面板变量平稳性的判断
由于面板单位根检验的方法很多,而且不同方法检验的结果可能不同。所以在实际应用时,尽量多用几种方法进行检验,然后根据多数的检验结果来判断变量是否平稳。