《计量经济第八章优秀PPT.ppt》由会员分享,可在线阅读,更多相关《计量经济第八章优秀PPT.ppt(29页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、计量经济第八章Introductory Econometrics,Lijun Jia1现在学习的是第1页,共29页Introductory Econometrics,Lijun Jia2Lecture Outline 本课提要nWhat is HSK什么是异方差nConsequences of HSK异方差的影响nHSK-Robust Inference after OLS estimationOLS估计后的“对异方差稳健”统计推断现在学习的是第2页,共29页Introductory Econometrics,Lijun Jia3nTesting for HSK 检验异方差nThe Breus
2、ch-Pagen TestB-P 检验nThe White TestWhite检验现在学习的是第3页,共29页Introductory Econometrics,Lijun Jia4nWeighted Least squares加权最小二乘法nWLS when HSK is known up to a multiplicative constant 当在比例意义上已知异方差时的加权最小二乘法nWLS when HSK is of unknown form:the feasible GLS当异方差具有未知形式时的加权最小二乘法:可行GLS现在学习的是第4页,共29页Introductory Ec
3、onometrics,Lijun Jia5What is Heteroskedasticity(HSK)什么是异方差n Recall the assumption of homoskedasticity implied that conditional on the explanatory variables,the variance of the unobserved error,u,was constant同方差假定意味着条件于解释变量,不可观测误差的方差同方差假定意味着条件于解释变量,不可观测误差的方差为常数为常数n If this is not true,that is if the
4、variance of u is different for different values of the xs,then the errors are heteroskedastic如果如果u 的方差随的方差随x变化,那么误差是异方差的。变化,那么误差是异方差的。现在学习的是第5页,共29页Introductory Econometrics,Lijun Jia6.Education level primarysecondaryf(y|x)Illustration of Heteroskedasticity异方差图示college.E(y|x)=b0+b1xwage现在学习的是第6页,共29
5、页Introductory Econometrics,Lijun Jia7Why do we care?为何关心异方差?nThe standard errors of the estimates are biased if we have heteroskedasticity.如果存在异方差,那么估计值的标准差是有偏的。n If the standard errors are biased,we can not use the usual t statistics or F statistics or LM statistics for drawing inferences.如果标准差有偏,我
6、们就不能应用通常的t统计量或F统计量来进行统计推断。现在学习的是第7页,共29页Introductory Econometrics,Lijun Jia8Testing for HSK检验异方差nReason No.1:We may prefer to see the usual OLS standard errors and test statistics reported unless there is evidence of heteroskedasticity.理由1:除非有证据显示异方差存在,我们仍会偏好于常规OLS的标准差及检验统计量。nReason No.2:If heterosk
7、edasticity is present,the OLS estimator is no longer the BLUE,then it is possible to obtain a better estimator than OLS.理由2:如果异方差存在,OLS不再是BLUE,那么就有可能得到比OLS更好的估计量。现在学习的是第8页,共29页Introductory Econometrics,Lijun Jia9The Breusch-Pagen Test for HSK用B-P检验异方差n Essentially we want to testn H0:Var(u|x1,x2,xk)
8、=s2,(8.11)nwhich is equivalent to H0:E(u2|x1,x2,xk)=E(u2)=s2本质上,我们想检验H0:Var(u|x1,x2,xk)=s2 这等价于检验H0:E(u2|x1,x2,xk)=E(u2)=s2 (因为 zero conditional expectation)现在学习的是第9页,共29页Introductory Econometrics,Lijun Jia10If we assume the relationship between u2 and xj will be linear,can test it as a set of linea
9、r restrictions如果我们假设u2 和xj之间具有线性关系,则可以通过一组线性约束来完成检验。n So,for u2=d0+d1x1+dk xk+v (8.12)n this means testingn H0:d1=d2=dk=0 (8.13)所以,对于 u2=d0+d1x1+dk xk+v 这意味着检验 H0:d1=d2=dk=0现在学习的是第10页,共29页Introductory Econometrics,Lijun Jia11The Breusch-Pagen Test for HSK用B-P检验检验异方差nUnder the null hypothesis,it is o
10、ften reasonable to assume that the error v is independent of x1,xk.在零假设下,通常可以假定误差v与x1,xk独立n Then either F or LM statistics for overall significance of the independent variables in explaining u2 can be used to test HSK.那么,如果将u2视为被解释变量,检验全部解释变量显著性的F 统计量就可以用来检验异方差。nThey are asymptotically valid test si
11、nce u2 is not normally distributed in the sample.由于u2在样本中不是正态分布,这些统计量只在渐近的意义下适用。现在学习的是第11页,共29页Introductory Econometrics,Lijun Jia12The Breusch-Pagen Test for HSK用B-P检验异方差nThe error cannot be observed by can be estimated from OLS residuals.不可观测的误差可以通过OLS残差进行估计。n After regressing the residuals square
12、d on all of the xs,can use the R2 to form an F or LM test.将残差平方对所有的 x 回归之后,可以通过R2构造F 检验。(8.15)现在学习的是第12页,共29页Introductory Econometrics,Lijun Jia13The Breusch-Pagen Test for HSK用B-P检验异方差现在学习的是第13页,共29页Introductory Econometrics,Lijun Jia14The Breusch-Pagen Test for HSK用B-P检验检验异方差现在学习的是第14页,共29页Introdu
13、ctory Econometrics,Lijun Jia15The Breusch-Pagen Test for HSK用B-P检验检验异方差现在学习的是第15页,共29页Introductory Econometrics,Lijun Jia16n5.然后看F和LM值的大小,或者对应的p值。如果F和LM值很大或者p值很小,则可以拒绝零假设!现在学习的是第16页,共29页Introductory Econometrics,Lijun Jia17The White Test for HSK用White检验检验异方差n The Breusch-Pagan test will detect any l
14、inear forms of heteroskedasticityB-P检验可以识别任意线性形式的异方差n The White test allows for nonlinearities by using squares and cross products of all the xsWhite检验通过加入 x 平方项和交叉项引入了一定的非线性。n Still just using an F or LM to test whether all the xj,xj2,and xjxh are jointly significant仍然是用F和LM检验来检验xj,xj2,xjxh是否联合显著现在
15、学习的是第17页,共29页Introductory Econometrics,Lijun Jia18The White Test for HSK用White检验检验异方差nThis can get to be unwieldy pretty quickly.这个办法很快就会显出其笨重之处。nFor example,if we have three explanatory variables,x1,x2,and x3then the White test will have 9 restrictions:3 on levels,3 on squares,and 3 on cross-produc
16、ts.例如,如果我们有三个解释变量x1,x2,x3那么White检验有9个约束,三个对线性项,三个对平方项,三个对交叉项。(如8.19)nWith small samples,degrees of freedom will soon be run out with more regressors.在小样本情形,自由度将会随着解释变量数目增加而迅速减少。现在学习的是第18页,共29页Introductory Econometrics,Lijun Jia19Alternate form of the White testWhite检验的变形n Consider that the fitted va
17、lues from OLS,are a function of all the xs考虑到OLS的预测值是所有x的函数。n Thus,2 will be a function of the squares and cross products.Therefore,and 2 can proxy for all of the xj,xj2,and xjxh.因此,2是平方项和交叉项的函数。和 2可以用来替代所有的xj,xj2,xjxh现在学习的是第19页,共29页Introductory Econometrics,Lijun Jia20Alternate form of the White te
18、stWhite检验的变形nRegress the residuals squared on and 2 and use the R2 to form an F or LM statistic,n将残差平方对 和 2回归(8.20),n用R2来构建F或LM统计量nNow we only need to test 2 restrictions now.n现在只需要检验两个约束nPage 283 检验过程!现在学习的是第20页,共29页Introductory Econometrics,Lijun Jia21White testnKeep the R-squared from this regres
19、sion,现在学习的是第21页,共29页Introductory Econometrics,Lijun Jia22Weighted Least Squares加权最小二乘法n While its always possible to estimate robust standard errors for OLS estimates,if we know something about the specific form of the heteroskedasticity,we can transform the model into one that has homoskedastic err
20、ors called weighted least squares.对OLS估计稳健标准差总是可能办到的,但是,如果我们知道一些关于异方差结构的信息,我们可以将原模型转化为具有同方差的新模型,这称为加权最小二乘法。现在学习的是第22页,共29页Introductory Econometrics,Lijun Jia23Weighted Least Squares加权最小二乘法nIn such cases weighted Least squares is more efficient estimates than OLS,and it produces t and F statistics th
21、at have t and F distributions.在这些情况中,加权最小二乘法比OLS更为有效。对应的t 和 F 统计量具有t 和 F 分布。现在学习的是第23页,共29页Introductory Econometrics,Lijun Jia24Generalized Least Squares广义最小二乘法n Estimating the transformed equation by OLS is an example of generalized least squares(GLS)通过OLS估计变换后的方程可以作为广义最小二乘法(GLS)的一个例子n GLS will be
22、BLUE in this caseGLS在这种情形下为BLUEn GLS is a weighted least squares(WLS)procedure where each squared residual is weighted by the inverse of Var(ui|xi)GLS是加权最小二乘法(WLS)在权重为Var(ui|xi)倒数时的特例。现在学习的是第24页,共29页Introductory Econometrics,Lijun Jia25Weighted Least Squares加权最小二乘法n While it is intuitive to see why
23、performing OLS on a transformed equation is appropriate,it can be tedious to do the transformation尽管对变换后的模型做OLS是直观的,但是变换本身可能很繁琐。n Weighted least squares is a way of getting the same thing,without the transformation 加权最小二乘法可以完成相同的目的,但是不需要进行变换。n Idea is to minimize the weighted sum of squares(weighted
24、 by 1/hi)想法是最小化加权平方和(权重为1/hi)现在学习的是第25页,共29页Introductory Econometrics,Lijun Jia26Weighted Least Squares加权最小二乘法现在学习的是第26页,共29页Introductory Econometrics,Lijun Jia27Feasible GLS可行GLSn More typical is the case where you dont know the form of the heteroskedasticity更典型的情形是你并不知道异方差的形式n In this case,you nee
25、d to estimate h(xi)此时,你需要估计h(xi)nTypically,we start with the assumption of a fairly flexible model,such as我们可以从一个非常灵活的方程形式入手 Var(u|x)=s2exp(d0+d1x1+dkxk)n Since we dont know the d,must be estimated 由于d未知,我们必须对它进行估计。现在学习的是第27页,共29页Introductory Econometrics,Lijun Jia28Feasible GLS(continued)可行GLSn Our
26、 assumption implies that我们的假定意味着 u2=s2exp(d0+d1x1+dkxk)v,where E(v|x)=1.n ln(u2)=a0+d1x1+dkxk+en Where E(e)=1 and e is independent of x其中E(e)=1 且 e 独立于xnNow,we know that is an estimate of u,so we can estimate this by OLS现在,我们知道现在,我们知道 是u 的一个估计,所以我们可以通过OLS对其进行估计。现在学习的是第28页,共29页Introductory Econometri
27、cs,Lijun Jia29Feasible GLS(continued)可行GLSn Now,an estimate of h is obtained as =exp(),and the inverse of this is our weight对h的估计可以通过=exp()得到,其倒数为我们的权重n So,what did we do?那么,我们做了什么呢?n Run the original OLS model,save the residuals,square them and take the log对原方程做OLS回归,保存残差,平方之,并取自然对数n Regress ln(2)on all of the independent variables and get the fitted values,将ln(2)对全部解释变量回归,得到预测值 n Do WLS using 1/exp()as the weight将1/exp()作为权重,做WLS现在学习的是第29页,共29页
限制150内