多元回归分析异方差_第1页
多元回归分析异方差_第2页
多元回归分析异方差_第3页
多元回归分析异方差_第4页
多元回归分析异方差_第5页
已阅读5页,还剩69页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

多元回归分析异方差演示文稿1第1页,共74页。2多元回归分析异方差第2页,共74页。ChapterOutline本章提要第3页,共74页。LectureOutline本课提要WhatisHSK什么是异方差ConsequencesofHSK异方差的影响HSK-RobustInferenceafterOLSestimationOLS估计后的“对异方差稳健”统计推断HSK-robuststandarderror HSK-异方差稳健标准差HSK-robustt,F,LMstatistics HSK-异方差稳健t,F,LM统计量第4页,共74页。WhatisHeteroskedasticity(HSK)

什么是异方差

Recalltheassumptionofhomoskedasticityimpliedthatconditionalontheexplanatoryvariables,thevarianceoftheunobservederror,u,wasconstant

同方差假定意味着条件于解释变量,不可观测误差的方差为常数Ifthisisnottrue,thatisifthevarianceofuisdifferentfordifferentvaluesofthex’s,thentheerrorsareheteroskedastic

如果u的方差随x变化,那么误差是异方差的。Example:estimatingreturnstoeducationandabilityisunobservable,andthinkthevarianceinabilitydiffersbyeducationalattainment

例子:估计教育回报并且能力不可观测,认为能力的方差随教育水平变化。第5页,共74页。.Educationlevelprimarysecondaryf(y|x)IllustrationofHeteroskedasticity异方差图示college..E(y|x)=b0+b1xwage第6页,共74页。Aspecificexample:histogramsofwageratesforeacheducationdegree,fromonlyeducated1yearto18years.

一个具体例子:每一个教育年限(1-18年)对应人群的工资直方图第7页,共74页。CheckingtheExistenceofHSK:plottingtheresidualsagainstthefittedvalues第8页,共74页。Whenthereisheteroskedasticity…

当存在异方差时…

OLSisstillunbiasedandconsistent. OLS无偏且一致R-squaredoradjustedR-squaredarestillfinegoodness-of-fitmeasures. R平方和调整后的R平方仍可以很好地度量拟合优度。TheyareestimatesofthepopulationR-squared,1

–[Var(u)/Var(y)],wherethevariancesaretheunconditionalvariancesinthepopulation.

它们是对总体R平方1

–[Var(u)/Var(y)]的估计,其中的方差是总体中的“非条件”方差。TheyconsistentlyestimatethepopulationR-squared,whetherornotVar(u|x)

=Var(y|x)dependsonx.

无论Var(u|x)

=Var(y|x)是否依赖于x,它们都可以一致地估计总体R平方。第9页,共74页。Whydowecare?

为何关心异方差?Thestandarderrorsoftheestimatesarebiasedifwehaveheteroskedasticity.

如果存在异方差,那么估计值的标准差是有偏的。Ifthestandarderrorsarebiased,wecannotusetheusualtstatisticsorFstatisticsorLMstatisticsfordrawinginferences. 如果标准差有偏,我们就不能应用通常的t统计量或F统计量来进行统计推断。第10页,共74页。Whattodo?

怎么办?Econometricianshavelearnedhowtoadjuststandarderrors,t,F,andLMstatisticssothattheyarevalidinthepresenceofheteroskedasticityofunknownform.

计量经济学家已经知道如何调整标准差,t,F,LM量,使得它们当未知形式的异方差存在时仍然有效。White(1980)showsthatthevariances,,canbeestimatedinthepresenceofheteroskedasticity.

White(1980)指出,在存在异方差时,方差也是可以估计的。第11页,共74页。VariancewithHeteroskedasticity

异方差存在时的方差第12页,共74页。VariancewithHeteroskedasticity

异方差存在时的方差第13页,共74页。VariancewithHeteroskedasticity

异方差存在时的方差第14页,共74页。VariancewithHeteroskedasticity

异方差存在时的方差Thesquarerootofiscalled:

开平方被称为Heteroskedasticity-robuststandarderror,or

对异方差稳健的标准差,或Whitestandarderror,or White标准差,或Huberstandarderror,or Huber标准差,或Eickerstandarderrors,or Eicker标准差第15页,共74页。RobustStandardErrors

稳健标准差

Nowtherobuststandarderrorscanbeusedforinference

稳健标准差可以用来进行推断。Sometimestheestimatedvarianceiscorrectedfordegreesoffreedombymultiplyingbyn/(n–k–1)

有时可以将估计的方差乘以n/(n–k–1)来修正自由度Asn→∞it’sallthesame,though.

当n→∞时,没有区别。第16页,共74页。Example:robustseversususualse

例子:稳健标准差与常规标准差第17页,共74页。Example:robustseversususualse

例子:稳健标准差与常规标准差Whatdowelearn?

我们学到了什么?Robuststandarderrorscanbeeitherlargerorsmallerthantheusualstandarderrors.

稳健标准差可能比常规标准差大,也可能小。Butempiricallytherobuststandarderrorsareoftenfoundtobelargerthanthestandarderrors.

但是实证中常常发现稳健标准差要大些。Ifthedifferencesbetweenthesetwoerrorsarelarge,thentheconclusionsforstatisticalinferencecanbeverydifferent.

如果这两种标准差的差异很大,那么统计推断的结论可能有很大差异。第18页,共74页。Now,whycareabouttheusualse?

为何要考虑常规标准差?第19页,共74页。RobustStandardErrors

稳健标准差第20页,共74页。Heteroskedasticy(HSK)-robustInferenceafterOLSestimation

OLS估计后的HSK-稳健推断LetrsedenoteHSK-robuststandarderrors

trse=(estimate-hypothesizedvalue)/(rse)

记rse为对异方差稳健的标准差

trse=(估计值-假设值)/(异方差稳健的标准差)TheHSK-RobustFstatistic对异方差稳健F统计量WithHSKtheusualFstatisticisnolongerFdistributed.

在异方差下,常规F统计量不再服从F分布。TheHSK-RobustFstatisticisalsocalledWaldstatistic HSK-稳健F统计量也称为Wald统计量Stataautomaticallycalculateitafterrobustregression Stata在稳健回归后自动计算第21页,共74页。

Example:usebirth.dta,comparetheusualandrobustregressions:theusualregressions

例子:比较常规回归和稳健回归:常规回归第22页,共74页。

desobs:1,388vars:143Jun199713:47size:55,520(99.5%ofmemoryfree)-------------------------------------------------------------------------------storagedisplayvaluevariablenametypeformatlabelvariablelabel-------------------------------------------------------------------------------famincfloat%9.0g1988familyincome,$1000scigtaxfloat%9.0gcig.taxinhomestate,1988cigpricefloat%9.0gcig.priceinhomestate,1988bwghtint%8.0gbirthweight,ouncesfatheducbyte%8.0gfather'syrsofeducmotheducbyte%8.0gmother'syrsofeducparitybyte%8.0gbirthorderofchildmalebyte%8.0g=1ifmalechildwhitebyte%8.0g=1ifwhitecigsbyte%8.0gcigssmkedperdaywhilepreglbwghtfloat%9.0glogofbwghtbwghtlbsfloat%9.0gbirthweight,poundspacksfloat%9.0gpackssmkedperdaywhilepreglfamincfloat%9.0glog(faminc)-------------------------------------------------------------------------------第23页,共74页。Example:usebirth.dta,comparetheusualandrobustregressions:therobustregressions

例子:比较常规回归和稳健回归:稳健回归第24页,共74页。Example:usebirth.dta,Fstatisticfortheusualregression

例子:应用birth.dta,常规回归的F统计量第25页,共74页。Example:usebirth.dta,Fstatisticfortherobustregression

例子:应用birth.dta,稳健回归的F统计量第26页,共74页。ARobustLMStatistic

稳健的LM统计量

RunOLSontherestrictedmodelandsavetheresidualsŭ

在有限制模型下进行OLS,保存残差ŭRegresseachoftheexcludedvariablesonalloftheincludedvariables(qdifferentregressions)andsaveeachsetofresidualsř1,ř2,…,řq

将每一个排除变量对全部未排除变量进行回归(q个回归)并将每一组残差ř1,ř2,…,řq保存Regressavariabledefinedtobe=1

onř1ŭ,ř2ŭ,…,řqŭ,withnointercept

将1向量对ř1ŭ,ř2ŭ,…,řqŭ进行无截矩回归。TheLMstatisticisn

–SSR1,whereSSR1isthesumofsquaredresidualsfromthisfinalregression LM定义为n

–SSR1其中SSR1

为最后一次回归的残差平方和。第27页,共74页。Examplebirth.dta:theLMfortheusualregression(1)

例子birth.dta:常规回归的LM第28页,共74页。Examplebirth.dta:theLMfortheusualregression(2)

例子birth.dta:常规回归的LM第29页,共74页。Examplebirth.dta:therobustLMstatistic(1)

例子birth.dta:稳健LM统计量(1)第30页,共74页。Examplebirth.dta:therobustLMstatistic(2)

例子birth.dta:稳健LM统计量(2)第31页,共74页。Examplebirth.dta:therobustLMstatistic(3)

例子birth.dta:稳健LM统计量(3)第32页,共74页。Examplebirth.dta:therobustLMstatistic(4)

例子birth.dta:稳健LM统计量(4)第33页,共74页。ChapterOutline本章提要第34页,共74页。LectureOutline本课提要第35页,共74页。第36页,共74页。第37页,共74页。第38页,共74页。第39页,共74页。第40页,共74页。第41页,共74页。第42页,共74页。第43页,共74页。第44页,共74页。第45页,共74页。第46页,共74页。

ConsiderthatthefittedvaluesfromOLS,ŷ,areafunctionofallthex’s

考虑到OLS的预测值ŷ是所有x的函数。Thus,ŷ2willbeafunctionofthesquaresandcrossproducts.Therefore,ŷandŷ2canproxyforallofthexj,xj2,andxjxh.

因此,ŷ2是平方项和交叉项的函数。ŷ

和ŷ2可以用来替代所有的xj,xj2,xjxh第47页,共74页。第48页,共74页。第49页,共74页。第50页,共74页。第51页,共74页。第52页,共74页。第53页,共74页。第54页,共74页。WeightedLeastSquares

加权最小二乘法

Whileit’salwayspossibletoestimaterobuststandarderrorsforOLSestimates,ifweknowsomethingaboutthespecificformoftheheteroskedasticity,wecantransformthemodelintoonethathashomoskedasticerrors–calledweightedleastsquares.

对OLS估计稳健标准差总是可能办到的,但是,如果我们知道一些关于异方差结构的信息,我们可以将原模型转化为具有同方差的新模型,这称为加权最小二乘法。第55页,共74页。WeightedLeastSquares

加权最小二乘法InsuchcasesweightedLeastsquaresismoreefficientestimatesthanOLS,anditproducestandFstatisticsthathavetandFdistributions. 在这些情况中,加权最小二乘法比OLS更为有效。对应的t和F统计量具有t和F分布。第56页,共74页。Caseofformbeingknownuptoamultiplicativeconstant

异方差结构在比例意义上已知的情况

SupposetheheteroskedasticitycanbemodeledasVar(ui|xi)=s2i=s2

hi,wherehi=h(x)dependsonlyontheobservedcharacteristics,x.

假设异方差可以由模型Var(ui|xi)=s2i=s2

hi刻画,其中hi=h(x)只依赖于可观测特征xInsuchsituation,let’sdefineui*=ui/√hiandconsiderhowdoestheGauss-Markovassumptionsperformforthetransformedmodel.

在这种情况下,定义ui*=ui/√hi并考虑转化后的模型是否服从Gauss-Markov假设。第57页,共74页。Caseofformbeingknownuptoamultiplicativeconstant

异方差结构在比例意义上已知的情况第58页,共74页。Caseofformbeingknownuptoamultiplicativeconstant

异方差结构在比例意义上已知的情况第59页,共74页。Caseofformbeingknownuptoamultiplicativeconstant

异方差结构在比例意义上已知的情况第60页,共74页。Caseofformbeingknownuptoamultiplicativeconstant

异方差结构在比例意义上已知的情况第61页,共74页。GeneralizedLeastSquares

广义最小二乘法

EstimatingthetransformedequationbyOLSisanexampleofgeneralizedleastsquares(GLS)

通过OLS估计变换后的方程可以作为广义最小二乘法(GLS)的一个例子GLSwillbeBLUEinthiscase GLS在这种情形下为BLUEGLSisaweightedleastsquares(WLS)procedurewhereeachsquaredresidualisweightedbytheinverseofVar(ui|xi) GLS是加权最小二乘法(WLS)在权重为Var(ui|xi)倒数时的特例。第62页,共74页。WeightedLeastSquares

加权最小二乘法

WhileitisintuitivetoseewhyperformingOLSonatransformedequationisappropriate,itcanbetedioustodothetransformation

尽管对变换后的模型做OLS是直观的,但是变换本身可能很繁琐。Weightedleastsquaresisawayofgettingthesamething,withoutthetransformation

加权最小二乘法可以完成相同的目的,但是不需要进行变换。Ideaistominimizetheweightedsumofsquares(weightedby1/hi)

想法是最小化加权平方和(权重为1/hi)第63页,共74页。WeightedLeastSquares

加权最小二乘法第64页,共74页。MoreonWLS

WLSisgreatifweknowwhatVar(ui|xi)lookslike

如果我们知道Var(ui|xi)的形式,WLS很棒Inmostcases,won’tknowformofheteroskedasticity

在大多数情况下,我们并不清楚异方差的形式第65页,共74页。FeasibleGLS

可行GLS

Moretypicalisthecasewhereyoudon’tknowtheformoftheheteroskedasticity

更典型的情形是你并不知道异方差的形式Inthiscase,youneedtoestimateh(xi)

此时,你需要估计h(xi)Typically,westartwiththeassumptionofafairlyflexiblemodel,suchas

我们可以从一个非常灵活的方程形式入手 Var(u|x)=s2exp(d0+d1x1+…+dkxk)Sincewedon’tknowthed,mustbeestimated 由于d未知,我们必须对它进行估计。第66页,共74页。FeasibleGLS(continued)

可行GLS

Ourassumptionimpliesthat

我们的假定意味着 u2=s2exp(d0

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论