中级计量济学2013s_第1页
中级计量济学2013s_第2页
中级计量济学2013s_第3页
中级计量济学2013s_第4页
中级计量济学2013s_第5页
已阅读5页,还剩66页未读 继续免费阅读

下载本文档

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

文档简介

ChapterTestsforFunctionalFormChapterTestsforFunctionalFormRamsey’sTestsforNon-nestedProxyvariablesforunobservedexplanatoryVariableswithMeasurementMissingData,NonrandomSamples,and2Model误设一Model误设一个模型的函数形式可能会导致局部效应的估计量有。需要的解释变量的数据都被准确收集,但是模型形式设需要的解释变量没有被准确地收若只是模型形式被误真实模型不是线性模型,我们当成线性模型(这个不在真实模型是线性,但是模型的设定形式有一种可能,是该包括的高阶项没有被包括的形式的看法不同(Nonnestalternativemodels)3Ramsey’sRESETAtestRamsey’sRESETAtestoffunctionalformisRamsey’sregressionspecificationerrortest(RESET)一种函数形式的检验是Ramsey回归设定误差检RESETaddspolynomialsintheOLSfittedvaluestotheoriginalregression.RESET在原回归中加入OLS拟合值的多项式4Ramsey’sRESETInsteadofaddingfunctionsofthex’sdirectly,weaddandRamsey’sRESETInsteadofaddingfunctionsofthex’sdirectly,weaddandfunctionsof我们加入并检验的函数,而不是直接加入的函数+ 2+3So,=++…+所以,估计y=0b11+。statisticorLM0:1=0,2015Ramsey’sRESETAsignificantFstatisticsuggestsRamsey’sRESETAsignificantFstatisticsuggestssomesortoffunctionalform一个显著的F统计量说明函数形式可能存在问题enfFsyF,n-k-3largesamplesunderthenullhypothesisandtheG-在零假设和G-M假定下,F的分布大样本近似6ImplementingRESETin在STATA中实施ImplementingRESETin在STATA中实施STATAusescommandovtestafterregcommand.ŷ2ŷ3andŷ4areusedinstata.STATA使用ŷ2ŷ3和ŷ4。regnarr86pcnvavgsentottimeptime86qemp86inc86blackRamseyRESETtestusingpowersofthefittedvaluesofnarr86Ho:modelhasnoomittedF(3,2713)Prob>F7ImplementingRESETin在STATA中实施AnImplementingRESETin在STATA中实施Analternativeistospecifytheoption,rhs.Inthiscasethepowertermsofalltheexplanatoryvariablesinsteadofthefittedvaluesareusedinthetest.ovtest,RamseyRESETtestusingpowersoftheindependentvariablesHo:modelhasnoomittedF(18,2698)9.73Prob>F8CautionsinUsing使用RESET的注意事RESETisgoodatCautionsinUsing使用RESET的注意事RESETisgoodatdetectingmisspecificationsintheformwwdetectingomittedvariableswhenevertheyhaveexpectationsarelinearintheincludedindependentWooldridge在1995年证明:当被遗漏变量的期望值时所含自变量的线性函数时,RESET无法探测出遗漏变量问。9Cautioninusingof使用Cautioninusingof使用RESET的注意事However,iftheomittedvariablehavenonlinearexpectationsinthedependentvariables,asignificantRESETcanindicateomitted-variableproblem.尽管如此,如果被遗漏变量的期望是自变量的非线性形式,一个显著的RESET可以指出遗漏变量问题rejected,RESETdoesnotsuggestwhattodointhenextstep.,它并不能建议我们下一步怎么做HousingPriceThisexampleisusedforHousingPriceThisexampleisusedfortwopurposes.First,logformscanbebetterindealingwithnonlinearitiesusingthelevel首先,处理非线性问题时,log形式可能比变量原形式更。Second,asignificantRESETmayindicatenonlineareffectomittedvariables,likethevariable“assess”addedin其次,一个显著的RESET可能指出被遗漏变量的非线性应,比如稍后加入的变量“assess”HousingPriceregpriceHousingPriceregpricelotsizesqrftRamseyRESETtestusingpowersofthefittedvaluesof(RESET检验用拟合价格的幂函数项Ho:modelhasnoomittedF(3,81)Prob>FHousingPriceExample:thelog住房价格的例子HousingPriceExample:thelog住房价格的例子:log形ThelogformdonotrejectthenullofnomisspecificationatsignificanceLog形式的回归在5%水平上没有拒绝零假设:没有函数式误设reglpricellotsizelsqrftbdrmsRamseyRESETtestusingpowersofthefittedvaluesoflprice(RESET验用lprice拟合值的幂函数项Ho:modelhasnoomittedF(3,81)Prob>FHousingPriceExample:thelog住HousingPriceExample:thelog住房价格的例子:log形reglpricelassessllotsizelsqrftInthisstepvariablelassessisasignificantvariablewitht=6.89.Ho:modelhasnoomittedvariablesF(3,80)Prob>FHousingPriceExample:thelog住房价HousingPriceExample:thelog住房价格的例子:log形Noticetheresultsaredifferentfromthetextbooksinceŷ2,ŷ3andŷ4areusedinstata,insteadof ŷ3asinthetextbook注意这里的结果和课本上不同,因为课本上使用ŷ2ŷ3这里stata用的是ŷ2ŷ3ŷ4Youcanreplicatethetextbookresultbyputtingŷ2,ŷ3into,你可以通过以下方法得到课本的结果:向主方程加入,使用F检验检验它们的联合显著性.,WhichoftheWhichofthefollowingmodelisbetter?(9.6)y01x12x2(9.7)y01log(x1)2log(x2)MizonandRichard(1986):ConstructacomprehensivethatcontainseachmodelasaspecialcaseandthentotestrestrictionsthatledtoeachoftheMizonandRichard(1986):造一个综合模型,将每个模都作为一个特殊情况包含其中,然后检验导致每个模型的约束InIntheaboveexample,thecomprehensivemodel,yr0r1x1r2x23log(x1)tlog(x2)andH0:10,20forortestH0:30,40forDavidsonandMacKinnon(1981):if(9.6)istrue,thenthefittedvaluesfrom(9.7),shouldbeinsignificantin(9.6).DavidsonandMacKinnon(1981):如果(9.6)正确,那么(9.7)得到的拟合值在(9.6)中应当不显著Totest(9.6),Totest(9.6),wefirstestimatemodel(9.7)byOLStoobtainthefitted为了检验(9.6),我们首先通过OLS估计模型(9.7)以到拟合值Putthisfittedvalueasanadditionalexplanatoryvariableinusetstatistictotestits将得到的拟合值作为另外的解释变量放到(9.6)中,用统计量检验其显著性TheHousingPriceExample:TheHousingPriceExample:Thecompetingmodels:竞争模型是reglpricebdrmscolonialassesslotsizereglpricebdrmscoloniallassessllotsizeThecombinedregression:组合的回归TheHousingPriceExample:TestingwhetherTheHousingPriceExample:Testingwhether(2)istherightone:testassesslotsizeF(79)2.92,Prob>FTestingwhether(1)istherightone:testlassessllotsize,.,.TheHousingPriceExample:TheHousingPriceExample: Testingwhether(2)istherightone:reglpriceassessbdrmslotsizesqrftpredictyl,reglpricelassessllotsizelsqrftbdrms Thetablebelowshowthatylisaninsignificantvariable.下表显示yl不是一个显著的变量。Source======-------------+-----------------------------ProbFModelResidual6R-AdjR-squaredRootMSE-------------+-----------------------------Source======-------------+-----------------------------ProbFModelResidual6R-AdjR-squaredRootMSE-------------+-----------------------------Total87lpriceStd.t[95%-------------+--------------------------------------------------------------|||||||----------Testingwhether(1)istherightSourceNumberofobs-------------+-----------------------------=====ModelTestingwhether(1)istherightSourceNumberofobs-------------+-----------------------------=====Model|Residual6Prob>FAdjR-squaredRootMSE-------------+-----------------------------Total87lpriceStd.t[95%-------------+-------------------------------------------------------------|||||||1.48e-----1.86e----NonnestedAlternativeTests:NonnestedAlternativeTests:嵌套替代模型的检验:注Theaboveexamplefavorsthelogmodel,butitisoftenpossibletoseebothmodelsberejected,neithermodelbe上面的例子偏好log模型,但可能经常看两个模型都被拒绝,或没有一个被拒绝NonnestedAlternativeTests:嵌套替代模型的检验:注WhenNonnestedAlternativeTests:嵌套替代模型的检验:注WhenbothareMoreworkonspecificationneedstobeHowever,iftheeffectsofkeyindependentvariablesonyarenotdifferent,thenitdoesnotreallymatterwhichmodelis当两个都被拒需要在模型设定上花更多功尽管如此,如果关键解释变量对y的效应差别不是很大,那么用个模型关系不是很大WhenbotharenotWecanusetheadjustedR-squaredtochoosebetween当两个都未被拒我们可以用调整过的R2在它们之间选择如果模型误设是因为得不如果模型误设是因为得不到一个重要解释变量的数据,么办如果是不可得但是可以找到近似的,那么可以用近似的为代理变如果变量可以找到但是有误差,那么考虑允许测量误差如果既不能找到代理变量,单单考虑测量误差也不能解问题,到下一章讨论ProxyWhatifmodelismisspecifiedProxyWhatifmodelismisspecifiedbecausenodataisavailableonimportantxItmaybepossibletoavoidormitigateomittedvariablebiasbyusingaproxyvariable.可能通过使用一个代理变量避免或减轻遗漏变量偏误Aproxyvariableissomethingthatisrelatedtothe.代理变量就是与我们在分析中试图控制而又观测不到的量相关的变量ProxyConsideramodelwithx*tobe3考虑模型,x*不可观测3yxxProxyConsideramodelwithx*tobe3考虑模型,x*不可观测3yxx01 xv30 30:allowingx*andxtobemeasuredindifferent33333measurestherelationshipbetweenx*andx33*xx之间的关系(333v3:theerrorduetox*andnottobeexactlythe33*(vx333ProxyPluginx,wecanseethat,*canbe3 estimatedundercertain可以被一致ProxyPluginx,wecanseethat,*canbe3 estimatedundercertain可以被一致地估计x,我们可以看到:在一定条件下植y3 xx01 01x12x23(03x3v3)30)1x12x2(3v330xxx''01 33where,,v''00 3ProxyTostartwithacorrectlyspecifiedmodel,weProxyTostartwithacorrectlyspecifiedmodel,we(1)E(u|xx,x)E(u|xxxv)* 3Therefore,weneedutobeuncorrelatedx1,x2,x3and合适的条件为开始于一个正确设定的模型,我们需要(1)E(u|xx,x)E(u|xxxv)* 3因此,我们需要u和x1x2,x3以及v3不相关ProxySecondly,we(2)E(|x1,x2,x3)E((v3u)ProxySecondly,we(2)E(|x1,x2,x3)E((v3u)|x1,x2,x3)0,Therefore,weneedv3tobeuncorrelatedwithx1,x2,x3.(2)requiresx3tobeagoodproxyinthesenseonlyx3isrelatedto3E(x*|xx,x)E(xv|xx,x)E(x*|x)x 03 03(2)E(|x1,x2,x3)E((v3u)|x1,x2,x3)因此,我们需要v3和x1,x2,x3不相关*xxx333E(x*|xx,x)xv|xx,x)E(x*|x)x 03 03ProxyVariables代理变量(续Whenthesetwoassumptionsaresatisfied,wearerunningregressionsy=(bProxyVariables代理变量(续Whenthesetwoassumptionsaresatisfied,wearerunningregressionsy=(b+3d)+11+22+3d33+(u+3) andhavejustredefinedintercept,error33),只要重新定义截3+23332和3TheIQ.reglwageeducexpertenuremarriedSourceofF======-------------+-----------------------------Model|7TheIQ.reglwageeducexpertenuremarriedSourceofF======-------------+-----------------------------Model|7ProbResidualAdjR-squaredRootMSE-------------+-----------------------------Total934lwageStd.t[95%+||||||||--------绘图:标准化的IQ关绘图:标准化的IQ关于标准化的工-4 -- 24-ifoneis - - 24-ifoneis - - ifoneis- -- TheRegressionAdding加入IQ的回.reglwageSourcetenureblackof======+||8TheRegressionAdding加入IQ的回.reglwageSourcetenureblackof======+||8ProbFRootMSE-------------+-----------------------------|934|+Std.t[95%|||||||||--------CautionsinUsingProxyWhenassumptionsarenotsatisfiedwecannotCautionsinUsingProxyWhenassumptionsarenotsatisfiedwecannotgetconsistentSay3=d0+d11+22+d33+Thenweareactually=++3)+3+1)(2+3d)x2实际上,我们可以估=+3d)x2Biaswilldependonsignsofb3LaggedDependentWhatifthereareunobservedvariables,andLaggedDependentWhatifthereareunobservedvariables,andyoucan’treasonableproxyMaybepossibletoincludealaggeddependentvariableaccountforomittedvariablesthatcontributetobothpastcurrentlevelsof可以包含一个滞后的被解释变量,说明同时影响过去和前y水平的被遗漏变量Obviously,youmustthinkpastandcurrentyarerelatedfortomake很显然的我们必须认为过去和当前的y相关,才有意义TheCrimeWeestimateaconstantTheCrimeWeestimateaconstantelasticityversionofthecrimemodel.ThedatainCRIME2.RAWarefrom46citiesfortheyear1987.Thecrimeratein1982isusedasanadditionalvariableintryingtocontrolforcityunobservablesthataffectcrimeandmaybecorrelatedwithcurrentlawenforcement_变log(crimerateper1000persons)log(lawexpenditure)unemploymentSometimeswehavethevariablewewant,butSometimeswehavethevariablewewant,butwethinkitmeasuredwithExamples:Asurveyaskshowmanyhoursdidyouworkoverlastyear,orhowmanyweeksyouusedchildcarewhenchildwasShouldrememberthatmeasurementerrorisanissueonlythevariablesforwhichtheeconometriciancancollectdatadifferfromthevariablesthatinfluencedecisionsbyindividuals,families,firms,andsoMeasurementerrorinydifferentfrommeasurementerrorinMeasurementErrorinaDependent被解释变量的测MeasurementErrorinaDependent被解释变量的测量误 *bethevariableofourinterest,butyisitsreportedvalue.Definemeasurementerroras0=y–令y误差为0=y–….0 0估计的模型yb0b11k+u+MeasurementErrorinaDependentIf0≠MeasurementErrorinaDependentIf0≠0then0willbebiased.However,itisassumethatthemeasurementerrorhaszeromean,hencethebiasIf0isstatisticallyindependentofeachofthejtheOLSIf0anduareuncorrelated,then(e0words,wefacelargervariancesthanthecasewithoutMeasurementerrorinthedependentcancausebiasesinOLSifitissystematicallyrelatedtoonemoreoftheexplanatoryIfthemeasurementerrorisjustarandomreportingerrorthatindependentoftheexplanatoryvariables,thenOLSisExample:MeasurementErrorinScrapscraprateinmanufacturingExample:MeasurementErrorinScrapscraprateinmanufacturingLetscrap*bethetruescraprateandscrapbethereported,.Onemightthinkthatafirmreceivingagrantismorelikelyunderreportitsscraprateinordertomakethegranteffective.Inthiscase,beta_1suffersdownwardMeasurementErrorinanExplanatoryMeasurementErrorinanExplanatoryWewishtoestimatey=0b11*+我们希望估计y011*uAssumeE(1=011Meansx1doesnotaffectyafter1hasbeencontrolledfor.意思是,在1被控制住之后1不影MeasurementErrorinanExplanatoryActualmodelestimated:y=0+1+MeasurementErrorinanExplanatoryActualmodelestimated:y=0+1+(u–11实际模型估计:y=b0+1+(u–11TheeffectofmeasurementerroronOLSestimatesdependsonassumptionaboutthecorrelationbetweenand测量误差对OLS估计量的影响依赖于我们对11相关性。Suppose(1OLSremainsunbiased1,measurementerrorinxwillV(ue) 2 1u errorvariancesine) 因为2 ,一般来说,x的测量误差会增加误差V(u1u 方差MeasurementErrorinanExplanatorySuppose*,)=0,knownastheclassicalerrors- variablesassumption,假设(1MeasurementErrorinanExplanatorySuppose*,)=0,knownastheclassicalerrors- variablesassumption,假设(11=1111+e1=0+e11与误差相关,所以,估计量Covx,2ˆ111 Varx1122e12 2 112222e eMeasurementErrorinanExplanatory注意MeasurementErrorinanExplanatory注意,增加的误差只SinceVar(x1)(x1)<1,theestimateisbiasedcalledattenuation因为It’smorecomplicatedwithamultipleregression,butcanstillexpectattenuationbiaswithclassicalerrorsinvariables.1)1估计量偏向0——称作衰。MissingData–Isita缺失数这是个MissingData–Isita缺失数这是个问题吗Ifanyobservationismissingdataononeofthevariablesinmodel,itcan’tbe如果所有观测值都在模型的一个变量上缺失数据,它不能使用了Ifdataismissingatrandom,usingasamplerestrictedobservationswithnomissingvalueswillbe如果数据随机缺失,使用限制于没有缺失值的观测的本就好Aproblemcanariseifthedataismissingsystematically–highincomeindividualsrefusetoprovideincome问题产生于数据的系统性缺失—比如高收入的个体拒提供收入数Nonrandom非随机样IfthesampleischosenonNonrandom非随机样Ifthesampleischosenonthebasisofvariable,estimatesareunbiased,thisiscalledexogenoussample如果样本基于一个解释变量进行选择的,那么估计量时偏的,这称作外生样本选择,calledendogenoussample如果样本基于被解释变量进行选择的,这称作择.内生样本选择将导致选择性偏误CrimeExample:Plottinglog(crime)againstunemploymentlog(crime)关于失业CrimeExample:Plottinglog(crime)againstunemploymentlog(crime)关于失业45 unemploymentCrimeExample:Plottinglog(crime)againstunemploymentrateiflog(crime)<4.8犯罪的例子:log(crime)CrimeExample:Plottinglog(crime)againstunemploymentrateiflog(crime)<4.8犯罪的例子:log(crime)对失业率图(如果) unemploymentRegressionwhenlog(crime)<4.8,estimatedcoefficientonlagoflog(crime)isbiaseddownward..reglcrmrtellawexpciflcrmrte<4.8Source======+-----------------------------Model3Regressionwhenlog(crime)<4.8,estimatedcoefficientonlagoflog(crime)isbiaseddownward..reglcrmrtellawexpciflcrmrte<4.8Source======+-----------------------------Model3ProbF|R-AdjR-squaredRootMSE-------------+-----------------------------||Std.t[95%+||||-----Insomeapplications,especiallywithsmallInsomeapplications,especiallywithsmalldatasets,theestimatesareinfluencedbyoneorseveralobservations.observationsarecalled orinfluentialobservation在某些应用中,尤其数据集较小时,OLS估计量会受一或几个观测的影响。这样的观测被称作离群点或有重要。Sometimesthisoutlierwillsimplybedotoerrorsindata–onereasonwhylookingatsummarystatisticsis有时,这些离群点仅仅是因为数据录入的差错,因此查数据的基本统计描述非常重要OutlierscanalsoarisewhensamplingfromaOutlierscanalsoarisewhensamplingfromasmallpopulationoneorseveralmembersofthepopulationareverydifferentsomerelevantaspectfromtherestofthe在对总体进行小样本抽样时,离群点也产生于,一个或个元素在某些方面与总体的其它元素非常地不同Looselyspeaking,anobservationisanoutlierifdroppingitaregressionanalysismakestheOLSestimateschangebypractically“large”宽泛地讲,如果在回归分析中舍弃一个观测导致OLS估量变化一个实际上“大”的量,那么,这个观测是离群。TheR&DExample:PlottingR&DinpercentageofsalesagainstsalesR&D例子:绘图TheR&DExample:PlottingR&DinpercentageofsalesagainstsalesR&D例子:绘图R&D占销售额的百分比关于销售tof rdas firmsales,TheR&DExample:PlottingR&Dinpercentageofsalesagainstsales,standardizedversionR&DTheR&DExample:PlottingR&Dinpercentageofsalesagainstsales,standardizedversionR&D占销售额的百分比对销售额图,标准化版-32tandardied0 1 standardizedWaystodealWaystodealwithMethod1:Dropthe方法1:舍弃离群Theregressionwiththe.rdintenssalesSource======-------------+-----------------------------ProbFModelTheregressionwiththe.rdintenssalesSource======-------------+-----------------------------ProbFModelResidual2R-AdjR-squaredRootMSE-------------+-----------------------------Total31rdintensStd.t[95%Conf.-------------+-------------------------------------------------------------|||--Theregressionwithoutthe.regrdintenssalesprofmargifSource======-------------+-----------------------------ProbTheregressionwithoutthe.regrdintenssalesprofmargifSource======-------------+-----------------------------ProbFModelResidual2R-AdjR-squaredRootMSE-------------+-----------------------------Total30rdintensStd.t[95%Conf.-------------+-------------------------------------------------------------|||-WaystodealwithWaystodealwithMethod2:transformthedataintofunctionalformsthatarelesssensitivetooutliers.方法2:将数据变换为对离群点较不敏感的函数形式Logformsareoften。PlottingthelogofrdintensagainstthelogofPlottingthelogofrdintensagainstthelogofsaleslog(rdintens)对log(sales)图 TheTransformedRegressionwiththe.lrdintlsalesSource======-------------+-----------------------------ProbFTheTransformedRegressionwiththe.lrdintlsalesSource======-------------+-----------------------------ProbFModelResidual2R-AdjR-squaredRootMSE-------------+-----------------------------Total31lrdintStd.t[95%Conf.-------------+-------------------------------------------------------------|||---TheTransformedRegressionwiththe.lrdintlsalesprofmargSource======-------------+-----------------------------ProbFTheTransformedRegressionwiththe.lrdintlsalesprofmargSource======-------------+-----------------------------ProbFModelResidual2R-AdjR-squaredRootMSE-------------+-----------------------------Total30

温馨提示

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

评论

0/150

提交评论