指点成金-最美分享吧

登录

计量︱时间序列数据检验方法总结

佚名 举报

篇首语:本文由小编为大家整理,主要介绍了计量︱时间序列数据检验方法总结相关的知识,希望对你有一定的参考价值。

本文来自经管之家论坛的坛友csvwmm


计量经济学的四种数据:

  • 1.横截面数据(cross sectional):不随时间变化的随机抽样的数据

  • 2.时间序列数据(time series):某些变量随时间变化的数据(无随机抽样假设,通常本期数据与近期数据高度相关)

  • 3.混合横截面数据(pooled cross section):不同的时间进行随机抽样的数据(不同的时间使用不同的样本)

  • 4.面板数据(综列数据,panel data):不同的时间使用相同的横截面数据(不同的时间使用相同的样本)





计量检验总结(二)-------时间序列数据

 

时间序列过程也叫做随即过程,时间序列遇到的问题主要是序列相关、单位根及协整的检验。

 

时间序列基础(小样本)


1、方法:OLS仍然适用

2、六个经典假设

TS.1: 线性;TS.2:条件均值为0TS.3:无完全共线性;TS.4:同方差;

TS.5:误差无序列相关(无自相关)--替代OLS的随机抽样假设;TS.6:误差正态分布

满足TS 1~ TS 3β无偏

满足TS 1~TS5:高斯马尔科夫成立,OLS is BLUEvar(βj)=σ2/SSTj(1-Rj2)

满足TS1~TS6β正态分布,tF统计量有效

3、有限分布滞后模型与短期长期倾向(FDL: finite distributed lag

yt00zt1zt-1+…+δqzt-q + ut 

目的:检验z是否对y有滞后的影响,δ0为短期倾向,δ01+…+δq为长期倾向

4、趋势与季节

趋势:在模型中加入t变量,衡量由于时间流逝,y从一个时期到下一个时期的变化,忽略了t,会导致ols有偏。

季节性:通过哑变量体现。



二、大样本情况(可放松假定TS.6):


1. Two important property: stationary and weakly dependent

(1)stationary(about joint distribution): if the joint distribution of {xt1,xt2,...,xtm} is the same as the joint distribution of {xt1+h,xt2+h,...,xtm+h},then xt is stationary.

(2)weakly dependent(about correlation): when h is infinit, if xt and xt+h are close to be independent, then xt is weakly dependent.

(3) why are they important: guarantee the CLT & LLN, which guarantee the accuracy of inference, stationary and weakly dependent series are the best time series

(4) examples about stationary and weakly dependent data

i). iid series

ii).MA(1): moving average process of order one

xt=et+et-1, t=1,2

xt is the weighted average value of et and et-1

iii). AR(1): autoregressive process of order one

yt=ρyt-1+et, t=1,2, et is iidwhen/ρ/<1it is stationary.

E[yt-1/ yt]= ρh yt=0, when h is infinite

 

2. Five assumption(drop TS.6)

TS.1: 线性and weakly dependent;TS.2:条件均值为0TS.3:无完全共线性;

TS.4:同方差;TS.5:误差无序列相关(无自相关)--替代OLS的随机抽样假设;

满足TS 1~ TS 3β is consistent, but not necessarily unbiased

满足TS 1~TS5β正态分布,t    F统计量有效

 

3.highly persistent or strongly dependent----violate stationary and weakly dependent

(1) if  it is not stationary and weakly dependent, CLT and LLN are not satisfied, then inference will not be accurate. If we use highly persistent data, we need to transform them into weakly dependent data.

(2) example of highly persistent----random walk from AR(1)

yt=yt-1+et,  ρ=1, et is iid.

E[yt]=E[y0], not dependent on t

E[yt+h/ yt ]=yt, not weakly dependent, highly persistent

V[yt]=σ2et, not stationary

Corr(yt, yt+h)=[t/(t+h)]^0.5, violate no autocorrelation

(3)unit root-----another example of highly persistent

i) defi: As long as ρ=1 in AR(1) form , then it is unit root process.(et can not be iid)

ii) relation with time trend

Highly persistent is to see if E[yt+h/ yt ]=yt , but not depend on t, so series with trend is not necessarily highly persistent. Also highly persistent has no clear time trend.

iii) Random walk with trend----highly persistent with time trend, special case of unit root

yt=α0+yt-1+et

(4)how to transfer highly persistent to weakly dependent

i) transfer unit root to weakly dependent

I(0): integrated of order zero, means weakly dependent process, can be used in OLS

I(1): integrated of order one, like unit root, random walk, means that the first difference of highly persistent is weakly dependent.

ii) transfer I(1) to I(0) :

first denote if it is I(1) using H0: ρ=1;

if we fail to reject H0, then do first difference.

5AR(1), random walk, unit root 总结:三者用一个公式yt=ρyt-1+et, t=1,2

AR(1), 要求et is iid,对ρ无要求,only when/ρ/<1it is stationary I(0)

random walk,要求ρ=1, 同时et is iid, 是unit root 的一种特例,not stationaryI(1)

unit root,要求ρ=1, 但et 不一定is iid, not stationaryI(1)

 

三、序列相关和异方差


1、误差序列相关(自相关)的定义:误差服从AR1):ut=ρut-1+et,  ρ是否=0

2、误差序列相关的后果

OLS不再BLUE,标准误和检验统计量无效,但是不影响无偏性质

3、检验方法:

1)回归元严格外生时AR1)序列相关的检验

方法1t 检验

步骤一:reg y on x, get uhat

步骤二:reg uthat on ut-1hat

步骤三:test ut-1hat 的系数H0: ρ=0;

If we fail to reject H0, there is no evidence of autocorrelation.

方法2Durbin-Watson检验

DW=Σuthat-ut-1hat^2/Σuthat^2

ρ=0 implies DW=2 ;ρ>0 implies DW<2;

判断标准:DW下界临界值)reject H0,有序列相关;DW>du(上界临界值)fail to reject H0,无序列相关。

Stata command: reg y on x; dwstat

优缺点:DW有一个精确的抽样分布列表,但是只适合于AR1),还可能产生很宽的不确定区域;T容易发现自回归的位置,还适用于异方差。

2)回归元不是严格外生时AR1)序列相关的检验

方法:t 检验

步骤一:reg y on x, get uhat

步骤二:reg uthat on x & ut-1hat

步骤三:test ut-1hat 的系数H0: ρ=1;

If we fail to reject H0, there is no evidence of autocorrelation.

3)高阶序列相关检验

方法1F检验

H0ρ1=0; ρ2=0;

步骤一:reg y on x, get uhat

步骤二:reg uthat on x & ut-1hatut-2hat

步骤三:F-test;

方法2LMBreusch-Godfrey)检验

LM=(n-q)Ruhat2

H0: no serial correlation

Stata command: reg y on x; bgodfrey, lat(q)

4、更正序列相关方法:

1)方法1FGLS----解释变量要严格外生,误差遵循AR1

步骤一:reg uthat on ut-1hat, getρ

步骤二:ytyt-10 (1-ρ) +β1(xt1xt-1)+k(xt1xt-1)+(utut-1)

步骤三:将估计的ρ代入步骤二

步骤四:三种方法估计ρ

方法1Cochran-Orcuttdrop the first time period, and use step 1, 适合大样本

方法2Prais-Winsten: transfer the first time period,适合小样本

方法3Hildreth-Lu:

Stata command: just for 方法2

reg y on x

tsset t

prais y x

prais y x, corc

(2) 方法2Robust Standard Error----解释变量可以不是外生,误差不一定AR1

Reg y on x

Newey y x, lag(q) 已经更正

 

5、序列相关与异方差同时存在

1)时间序列异方差的检验

序列相关会使异方差检验无效,要先检验序列相关,在更正序列相关,再用检验异方差的方法(whiteBP)去检验异方差,如果有异方差,可以适用异方差稳健统计量。

2)动态形势的异方差(xt包含滞后的因变量)----ARCH模型(自回归条件异方差)

ut2=a0+a1ut-12+vt

看起来很像ut2的自回归模型

ARCH是一种特殊形式的异方差

3)更正方法:FGLS

步骤一:reg y on x

步骤二:reg log(u) on x, get log(u)hat

步骤三:计算ht=exp(log(ut)hat)

步骤四:用C-OP-W估计下面方程:将原来模型两边同乘ht^0.5

 


四、单位根检验

还是用AR1),与序列相关不同的是看ρ是否=1,等价于θ=0

1、检验单位根的重要性

因为单位根不是平稳且弱相依的,如果检测出单位根需要将其化成平稳弱相依I(0),从而保证CLTLLN成立,以及保证OLS推断的正确,同时还可以解决谬误回归问题。

2、三种方法

1)方法1DFΔyt=α+θyt-1+ ut

Ho: θ=0I1),there is unit root

2)方法2ADFΔyt=α+θyt-1+β1Δyt-1 +β2 Δyt-2+…+ut

Ho: θ=0I1),there is unit root

3)方法3ADF-GLSΔyt*gls=α+θyt-1*gls+β1Δyt-1*gls +β2 Δyt-2*gls +…+ut

Ho: θ=0I1),there is unit root

类似WLSY*=Y/W

优点:has stronger power and no size distortion problem than ADF

 

五、判断协积(cointegration----有关两个变量的长短期关系


1、判断yx是否协积

步骤一:用DF分别对yx检验是否有单位根

步骤二:如果两个都是I1),构造St=yt-βxt, DF检验St是否是I(0), θ=0不成立,没有单位根。结果如果是I(0),表明xy是协积的,如果是I1),不是协积的。

步骤三:如果β未知,reg y on x; reg ut on ut-1,如果ut-1系数=0,有单位根,I(1),x与y不是协积的。

2、检验β=1----Leads & Lagges estimator

一般协积情况下,β是=1的。

Step1:(a)yt=α+βxt+ut=α+β(xt-1+εt)+ut

At this time xt is endogeneous

(b)ut=η+φ0Δxt+φ1Δxt-1+φ2Δxt-2+γ1Δxt+1+γ2Δxt+2+et, et is not correlated with leads and lagges

Step2: plug b into a : yt=α0+βxt+φ0Δxt+φ1Δxt-1+φ2Δxt-2+γ1Δxt+1+γ2Δxt+2+et, at this time et is uncorrelated with xt, then we can get exogeneity & get valid βs

3、检验短期动态

1)建议一个模型:estimate an error correction model using the Engle-Granger 2-step procedure

2)步骤:

Case1:if βis known, use ECM

Δy=α+γ0Δx+δ(lnyt-1-βlnxt-1)+ut

Case2: if βis unknown, use Enger-Granger 2 proce

Ols:yt=α0+βlnxt+ut,get β尖尖

ECM: Δy=α+γ0Δxt+δ(lnyt-1-β尖尖lnxt-1)+ut

3)解释:δ is the parameter that gives us the short run dynamic of the relationship between yt and xt,it is always negative

If St=ytxt>0, then Stδ<0, it means that in the previous period, change y was above the change in x, in this period, the change in x must be higher than y to close the gap, and hence return to equilibrium




以上是关于计量︱时间序列数据检验方法总结的主要内容,如果未能解决你的问题,请参考以下文章