《计量经济第八章精选PPT.ppt》由会员分享,可在线阅读,更多相关《计量经济第八章精选PPT.ppt(29页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
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 Breusch-P
2、agen 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 Econometri
3、cs,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 variance
4、 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页哦Introductor
5、y 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.如果标准差有偏,我们就不能应用通常的t统计
6、量或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 heteroskedasticity is
7、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)=s2,(8.11)nwhich
8、 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 linear restrictions如果我们
9、假设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 often reasonable to a
10、ssume 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 since u2 is not normal
11、ly 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 squared on all of the xs,can
12、 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页哦Introductory Econometrics,Lijun Jia
13、15The 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 linear forms of heteroskedasticit
14、yB-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是否联合显著第17页,此课件共29页哦Introductory Economet
15、rics,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-products.例如,如果我们有三个解释变量x1,x2,x3那么White检验
16、有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 values from OLS,are a function of all
17、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 testWhite检验的变形nRegress the residuals squ
18、ared 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 regression,第21页,此课件共29页哦Introductory Econometr
19、ics,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 errors called weighted least squares.对OLS估计稳健
20、标准差总是可能办到的,但是,如果我们知道一些关于异方差结构的信息,我们可以将原模型转化为具有同方差的新模型,这称为加权最小二乘法。第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 that have t and F distributions.在这些情况中,加权最小二乘法
21、比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 BLUE in this caseGLS在这种情形下为BLUEn GLS is a weig
22、hted 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 performing OLS on a transformed equation is appr
23、opriate,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 by 1/hi)想法是最小化加权平方和(权重为1/hi)第25页,此课件共29页哦Introd
24、uctory 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 need to estimate h(xi)此时,你需要估计h(xi)nTypically,we start
25、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 assumption implies that我们的假定意味着 u2=s2exp(d0+d1x1+dkxk
26、)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 Econometrics,Lijun Jia29Feasible GLS(continued)可行GLSn Now,an estim
27、ate 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页哦