面板数据协整检验(Stata)

您所在的位置:网站首页 面板数据的f检验是什么意思 面板数据协整检验(Stata)

面板数据协整检验(Stata)

2024-07-13 21:50| 来源: 网络整理| 查看: 265

面板数据协整检验(Stata)

当时间序列数据存在非平稳性时,直接将经济变量进行回归可能产生伪回归问题。针对非平稳数据计量建模,首先要判定这些变量是否存在同阶单整,如果满足同阶单整,才有必要对这些变量进行协整检验。当所涉及的变量存在协整时,由这些变量构建的回归模型才有意义,这也是区别于真实回归和虚假回归的标志。协整检验的前提是原始变量是非平稳的,或者变量具有单位根过程。因此在实际操作时,先对原始变量进行单位根检验,当所有变量都是非平稳,且同阶差分平稳时(或者同阶单整),才有必要采取协整检验。在Stata软件中,提供了Kao、pedroni和 westerlund三种检验方式,不同方式有其不同的适用条件,具体如下:

kao检验只能用于同质面板,命令选择项包括

lags(#)ADF检验滞后阶数#,见下文kernel()协方差矩阵核估计方法,见下文demean个体去均值

Pedroni检验适用于异质面板,命令选择项包括

ar(panelspecific|same) ADF检验中AR系数异质(默认)否lags(#)ADF检验滞后阶数#kernel()协方差矩阵核估计方法demean个体去均值trend 趋势效应noconstant 无个体效应

westerlund检验适用于异质面板,命令选择项包括

trend 趋势效应demean个体去均值somepanles 一定比例的面板数据存在协整(默认)allpanels 全部变量存在协整

其中ADF的检验形式包括:

# 表示滞后阶数,缺失默认为1aic # 以aic准则确定最大滞后阶数 #bic # 以bic准则确定最大滞后阶数 #hqic # 以hqic准则确定最大滞后阶数 #

协方差核估计选择项包括:barlett newest 、barlett # 、parzen newest、parzen #、quadraticspectral newst、quadraticspectral #。上述三种检验的原假设为H0:变量间不存在协整关系;Kao、pedroni检验备择假设H1:全部变量之间存在协整关系。westerlund检验的备择假设存在两种形式,包括H1-a:全部变量存在协整关系;H1-b:存在一定比例的变量具有协整关系。

代码(Stata)操作如下:

* help xtcointtest **# 1 数据准备 webuse xtcoint //调用网页数据 summarize rddomestic- productivity //描述统计 **# 2 单位根检验 xtunitroot ht productivity /* xtunitroot ht productivity Harris-Tzavalis unit-root test for productivity ----------------------------------------------- H0: Panels contain unit roots Number of panels = 100 Ha: Panels are stationary Number of periods = 150 AR parameter: Common Asymptotics: N -> Infinity Panel means: Included T Fixed Time trend: Not included ------------------------------------------------------------------------------ Statistic z p-value ------------------------------------------------------------------------------ rho 0.9822 0.9741 0.8350 ------------------------------------------------------------------------------ */ xtunitroot ht rddomestic /* Harris-Tzavalis unit-root test for rddomestic --------------------------------------------- H0: Panels contain unit roots Number of panels = 100 Ha: Panels are stationary Number of periods = 150 AR parameter: Common Asymptotics: N -> Infinity Panel means: Included T Fixed Time trend: Not included ------------------------------------------------------------------------------ Statistic z p-value ------------------------------------------------------------------------------ rho 0.9999 9.3783 1.0000 ------------------------------------------------------------------------------ */ xtunitroot ht rdforeign /* Harris-Tzavalis unit-root test for rdforeign -------------------------------------------- H0: Panels contain unit roots Number of panels = 100 Ha: Panels are stationary Number of periods = 150 AR parameter: Common Asymptotics: N -> Infinity Panel means: Included T Fixed Time trend: Not included ------------------------------------------------------------------------------ Statistic z p-value ------------------------------------------------------------------------------ rho 0.9990 8.9594 1.0000 ------------------------------------------------------------------------------ */ *以上结果表明productivity、rddomestic和rdforeign非平稳,接下来考虑一阶差分,再进行单位根检验 xtunitroot ht d.productivity,demean /* Harris-Tzavalis unit-root test for D.productivity ------------------------------------------------- H0: Panels contain unit roots Number of panels = 100 Ha: Panels are stationary Number of periods = 149 AR parameter: Common Asymptotics: N -> Infinity Panel means: Included T Fixed Time trend: Not included Cross-sectional means removed ------------------------------------------------------------------------------ Statistic z p-value ------------------------------------------------------------------------------ rho -0.3755 -6.4e+02 0.0000 ------------------------------------------------------------------------------ */ xtunitroot ht d.rddomestic,demean /* xtunitroot ht d.rddomestic,demean Harris-Tzavalis unit-root test for D.rddomestic ----------------------------------------------- H0: Panels contain unit roots Number of panels = 100 Ha: Panels are stationary Number of periods = 149 AR parameter: Common Asymptotics: N -> Infinity Panel means: Included T Fixed Time trend: Not included Cross-sectional means removed ------------------------------------------------------------------------------ Statistic z p-value ------------------------------------------------------------------------------ rho -0.0039 -4.6e+02 0.0000 ------------------------------------------------------------------------------ */ xtunitroot ht d.rdforeign,demean /* Harris-Tzavalis unit-root test for D.rdforeign ---------------------------------------------- H0: Panels contain unit roots Number of panels = 100 Ha: Panels are stationary Number of periods = 149 AR parameter: Common Asymptotics: N -> Infinity Panel means: Included T Fixed Time trend: Not included Cross-sectional means removed ------------------------------------------------------------------------------ Statistic z p-value ------------------------------------------------------------------------------ rho -0.0029 -4.6e+02 0.0000 ------------------------------------------------------------------------------ */ * 以上结果表明,所有变量满足一阶单整I(1),下面考虑协整 **# 3 协整检验 xtcointtest kao productivity rddomestic rdforeign //Kao检验 /* Kao test for cointegration -------------------------- H0: No cointegration Number of panels = 100 Ha: All panels are cointegrated Number of periods = 148 Cointegrating vector: Same Panel means: Included Kernel: Bartlett Time trend: Not included Lags: 3.60 (Newey–West) AR parameter: Same Augmented lags: 1 ------------------------------------------------------------------------------ Statistic p-value ------------------------------------------------------------------------------ Modified Dickey–Fuller t -23.6733 0.0000 Dickey–Fuller t -15.1293 0.0000 Augmented Dickey–Fuller t -3.6909 0.0001 Unadjusted modified Dickey–Fuller t -46.7561 0.0000 Unadjusted Dickey–Fuller t -20.2521 0.0000 ------------------------------------------------------------------------------ *共有5个统计量,最后两个没有校正,主要看ADF检验 */ xtcointtest pedroni productivity rddomestic rdforeign //pedroni检验 /* Pedroni test for cointegration ------------------------------ H0: No cointegration Number of panels = 100 Ha: All panels are cointegrated Number of periods = 149 Cointegrating vector: Panel specific Panel means: Included Kernel: Bartlett Time trend: Not included Lags: 4.00 (Newey–West) AR parameter: Panel specific Augmented lags: 1 ------------------------------------------------------------------------------ Statistic p-value ------------------------------------------------------------------------------ Modified Phillips–Perron t -26.1145 0.0000 Phillips–Perron t -21.2436 0.0000 Augmented Dickey–Fuller t -25.3701 0.0000 ------------------------------------------------------------------------------ 三个统计量都具有参考价值 */ xtcointtest westerlund productivity rddomestic rdforeign // westerlund检验,默认部分比例存在协整 /* Westerlund test for cointegration --------------------------------- H0: No cointegration Number of panels = 100 Ha: Some panels are cointegrated Number of periods = 150 Cointegrating vector: Panel specific Panel means: Included Time trend: Not included AR parameter: Panel specific ------------------------------------------------------------------------------ Statistic p-value ------------------------------------------------------------------------------ Variance ratio -8.0237 0.0000 ------------------------------------------------------------------------------ */ * 下面考虑将H1:全部变量存在协整 作为备择假设 xtcointtest westerlund productivity rddomestic rdforeign, allpanels /* Westerlund test for cointegration --------------------------------- H0: No cointegration Number of panels = 100 Ha: All panels are cointegrated Number of periods = 150 Cointegrating vector: Panel specific Panel means: Included Time trend: Not included AR parameter: Same ------------------------------------------------------------------------------ Statistic p-value ------------------------------------------------------------------------------ Variance ratio -5.9709 0.0000 ------------------------------------------------------------------------------ */ ** 以上结果表明,变量productivity rddomestic rdforeign存在协整,可以考虑非平稳建模,如面板向量误差修正模型等。 -END-


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3