多元回歸分析模型識別和數(shù)據(jù)問題_第1頁
多元回歸分析模型識別和數(shù)據(jù)問題_第2頁
多元回歸分析模型識別和數(shù)據(jù)問題_第3頁
多元回歸分析模型識別和數(shù)據(jù)問題_第4頁
多元回歸分析模型識別和數(shù)據(jù)問題_第5頁
已閱讀5頁,還剩24頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

多元回歸分析模型識別和數(shù)據(jù)問題第1頁,課件共29頁,創(chuàng)作于2023年2月contentsFunctionalformmisspecificationUsingproxyvariablesMeasurementerrorinvariablesMissingdataandOutlyingobservations第2頁,課件共29頁,創(chuàng)作于2023年2月Functionalfrommisspecification第3頁,課件共29頁,創(chuàng)作于2023年2月FunctionalFormWe’veseenthatalinearregressioncanreallyfitnonlinearrelationshipsCanuselogsonRHS,LHSorbothCanusequadraticformsofx’sCanuseinteractionsofx’sHowdoweknowifwe’vegottentherightfunctionalformforourmodel?第4頁,課件共29頁,創(chuàng)作于2023年2月FunctionalForm(continued)First,useeconomictheorytoguideyouY=AKaLbeuorlnY=lnA+alnK+blnL+uThinkabouttheinterpretationlog(wage)=b0+b1

educ+u,orlog(educ)asindependentvariableDoesitmakemoresenseforxtoaffectyinpercentage(uselogs)orabsoluteterms?Doesitmakemoresenseforthederivativeofx1tovarywithx1(quadratic)orwithx2(interactions)ortobefixed?第5頁,課件共29頁,創(chuàng)作于2023年2月FunctionalForm(continued)Wealreadyknowhowtotestjointexclusionrestrictionstoseeifhigherordertermsorinteractionsbelonginthemodellog(wage)=b0+

b1

educ+b2

exper+b3tenure+ulog(wage)=b0+

b1

educ+b2

exper+b3tenure+b4educ2+b5exper2+b6tenure2+b7educ?tenure+uItcanbetedioustoaddandtestextraterms,plusmayfindasquaretermmatterswhenreallyusinglogswouldbeevenbetterAtestoffunctionalformisRamsey’sregressionspecificationerrortest(RESET)Firstestimatelog(wage)=b0+

b1

educ+b2

exper+b3tenure+uGetfittedvalue?(log(wage)

ofaboveequation)Then,considertheexpandedequationlog(wage)=b0+

b1

educ+b2

exper+b3tenure+d4?2+d5?3+uRESETistheFstatisticfortesingH0:d4=0,d5=0InStata,theRESETtestcommand:ovtestWhetherthemodely=b0+b1x1+…+bkxk+umisspecified?RESETreliesonatricksimilartothespecialformoftheWhitetestInsteadofaddingfunctionsofthex’sdirectly,weaddandtestfunctionsof?So,estimatey=b0+b1x1+…+bkxk+d1?2+d1?3+errorandtestH0:d1=0,d2=0usingF~F2,n-k-3orLM~χ22第6頁,課件共29頁,創(chuàng)作于2023年2月RESETtest,exampleHousingpriceequation(hprice.raw)price=b0+b1

lotsize+b2sqrft+b3bdrms+ulog(price)=b0+b1

log(lotsize)+b2

log(sqrft)+b3bdrms+uRESETtestprocedureEstimatethemodels:regpriceonlotsize,sqrft,bdrms,andgetfittedvalueofprice,?andSSRr=300723.806,n=88R2=0.6724Calculate?2,?3,andplugthemtotheoriginalequation,andestimateit.Thatis,regpriceonlotsize,sqrft,bdrms,?2,?3,andSSRur=269983.825n=88R2=0.7059SotheFvalue=[(300723.806-269983.825)/2]/(269983.825/82)=4.6682,thep-value=0.012,therefore,wewillrejectthenullhypothesisthatthereisnomisspecification.Inthesameway,wecancalculatethesecondmodelF=[(2.86256385-2.69401081)/2]/(2.69401081/82)=2.565,p-value=0.0835.Sowecan’trejectthenullhypothesisatthe5%significance.第7頁,課件共29頁,創(chuàng)作于2023年2月Ifthemodelshavethesamedependentvariables,butnonnestedx’scouldstilljustmakeagiantmodelwiththex’sfrombothandtestjointexclusionrestrictionsthatleadtoonemodelortheother.Forexample,wehavetochoosemodelbetweeny=b0+b1x1+b2x2+u(m1)y=b0+b1log(x1)+b2log(x2)+u(m2)Whichmodeltochoose?

Method1:estimateacomprehensivemodely=d0+d1x1+d2x2+

d3log(x1)+d4log(x2)+uH0:d3=0,d4=0forthesecondmodelandH0:d1=0,d1=0forthefirstone.Method2:theDavidson-MackinnontestIf(m1)istrue,thenthefittedvaluesfrom(m2)shouldbeinsignificantin(m1).Thus,totest(m1),wefirstestimate(m2)byOLStoobtainthefittedvalues,?.Thenplugitinto(m1),that’sy=b0+b1x1+b2x2+q

?+uAsignificanttstatisticisarejectionofmodel(m1).NonnestedAlternativesTest第8頁,課件共29頁,創(chuàng)作于2023年2月Proxyvairables第9頁,課件共29頁,創(chuàng)作于2023年2月ProxyVariablesWhatifmodelismisspecifiedbecausenodataisavailableonanimportantxvariable?ItmaybepossibletoavoidomittedvariablebiasbyusingaproxyvariableModel:y=b0+b1x1+b2x2+b3x3*+uAproxyvariablemustberelatedtotheunobservablevariable–forexample:x3*=d0+d3x3+v3,where*impliesunobservedNowsupposewejustsubstitutex3forx3*第10頁,課件共29頁,創(chuàng)作于2023年2月ProxyVariables(continued)y=b0+b1x1+b2x2+b3x3*+ux3*=d0+d3x3+v3Whatdoweneedforforthissolutiontogiveusconsistentestimatesofb1andb2?Assumeuisuncorrelatedwithx1,x2andx3*,x3andv3isuncorrelatedwithx1,x2andx3E(x3*|x1,x2,x3)=E(x3*|x3)=d0+d3x3

Soreallyrunningy=(b0+b3d0)+b1x1+b2x2+b3d3x3+(u+b3v3)andhavejustredefinedintercept,errortermx3coefficient第11頁,課件共29頁,創(chuàng)作于2023年2月Example:IQasaProxyforAbility(wage2.raw,p297)Modellog(wage)=b0+b1educ+b2exper

+b3abil+uAssumeE(u|educ,exper,abil)=0Butthedataofabilityisnotavailable,wethinkIQmaycorrelatewithability,that’sabil=d0+d1IQ+vAssumeE(v|educ,exper,IQ)=0soweuseIQasaproxyforability.Andtheestimatedmodelislog(wage)=b0*+b1educ+b2exper

+b3*IQ+u*Resultslog(wage)=5.503+0.078

educ+0.0198exper

(biasedestimate)(0.112)(0.007)(0.003)n=935R2=0.1309

log(wage)=5.198+0.057educ+0.0195exper

+0.0058IQ(0.122)(0.007)(0.003)(0.001)n=935R2=0.1622(efficientestimate)第12頁,課件共29頁,創(chuàng)作于2023年2月ProxyVariables(continued)Withoutoutassumptions,canendupwithbiasedestimatesSayx3*=d0+d1x1+d2x2+d3x3+v3Thenreallyrunningy=(b0+b3d0)+(b1+b3d1)x1+(b2+b3d2)x2+b3d3x3+(u+b3v3)Biaswilldependonsignsofb3anddjThisbiasmaystillbesmallerthanomittedvariablebias,though第13頁,課件共29頁,創(chuàng)作于2023年2月LaggedDependentVariablesWhatifthereareunobservedvariables,andyoucan’tfindreasonableproxyvariables?Maybepossibletoincludealaggeddependentvariabletoaccountforomittedvariablesthatcontributetobothpastandcurrentlevelsofy,thatis,usey-1toexplainy.y=b0+b1x1+b2x2+b3x3*+uy=b0+b1x1+b2x2+b3y-1+uObviously,youmustthinkpastandcurrentyarerelatedforthistomakesense第14頁,課件共29頁,創(chuàng)作于2023年2月MeasurementError第15頁,課件共29頁,創(chuàng)作于2023年2月MeasurementErrorSometimeswehavethevariablewewant,butwethinkitismeasuredwitherrorExamples:Asurveyaskshowmanyhoursdidyouworkoverthelastyear,orhowmanyweeksyouusedchildcarewhenyourchildwasyoungMeasurementerrorinydifferentfrommeasurementerrorinx第16頁,課件共29頁,創(chuàng)作于2023年2月MeasurementErrorinaDependentVariableModely*=b0+b1x1+…+bkxk+uyistheobservablemeasureofy*.Definemeasurementerrorase0=y–y*Thus,reallyestimatingy=b0+b1x1+…+bkxk+u+e0WhenwillOLSproduceunbiasedresults?Ife0andxj,uareuncorrelatedisunbiasedIfE(e0)≠0then

b0willbebiased,thoughWhileunbiased,largervariancesthanwithnomeasurementerrorVar(u+e0)=su2+se2第17頁,課件共29頁,創(chuàng)作于2023年2月MeasurementErrorinanExplanatoryVariabley=b0+b1x1*+uDefinemeasurementerrorase1=x1–x1*x1isthemeasureofthetruevaluex1*AssumeE(e1)=0,E(y|x1*,x1)=E(y|x1*)Reallyestimatingy=b0+b1x1+(u–b1e1)TheeffectofmeasurementerroronOLSestimatesdependsonourassumptionaboutthecorrelationbetween

e1andx1

SupposeCov(x1,e1)=0OLSremainsunbiased,varianceslarger第18頁,課件共29頁,創(chuàng)作于2023年2月MeasurementErrorinanExplanatoryVariable(cont)SupposeCov(x1*,e1)=0,knownastheclassicalerrors-in-variablesassumption(CEV),thenCov(x1,e1)=E(x1e1)=E(x1*e1)+E(e12)=0+se2Seeestimatedmodely=b0+b1x1+(u–b1e1)x1iscorrelatedwiththeerrorsoestimateisbiased第19頁,課件共29頁,創(chuàng)作于2023年2月MeasurementErrorinanExplanatoryVariable(cont)NoticethatthemultiplicativeerrorisjustVar(x1*)/Var(x1)SinceVar(x1*)/Var(x1)<1,theestimateisbiasedtowardzero–calledattenuationbiasIt’smorecomplicatedwithamultipleregression,butcanstillexpectattenuationbiaswithclassicalerrorsinvariables第20頁,課件共29頁,創(chuàng)作于2023年2月MissingdataandOutlyingobservations第21頁,課件共29頁,創(chuàng)作于2023年2月MissingData–IsitaProblem?Ifanyobservationismissingdataononeofthevariablesinthemodel,itcan’tbeusedIfdataismissingatrandom,usingasamplerestrictedtoobservationswithnomissingvalueswillbefineAproblemcanariseifthedataismissingsystematically–sayhighincomeindividualsrefusetoprovideincomedata第22頁,課件共29頁,創(chuàng)作于2023年2月NonrandomSamplesIfthesampleischosenonthebasisofanxvariable,thenestimatesareunbiasedIfthesampleischosenonthebasisoftheyvariable,thenwehavesampleselectionbiasSampleselectioncanbemoresubtle第23頁,課件共29頁,創(chuàng)作于2023年2月OutliersSometimesanindividualobservationcanbeverydifferentfromtheothers,andcanhavealargeeffectontheoutcomeSometimesthisoutlierwillsimplybedotoerrorsindataentry–onereasonwhylookingatsummarystatisticsisimportantSometimestheobservationwilljusttrulybeverydifferentfromtheothers第24頁,課件共29頁,創(chuàng)作于2023年2月OutlierTest1

StudentizedResidualse(i)=yi–b(i)xi,where

b(i)representtheestimatedregressionslopewhentheithobservationhasbeenomitted.E(e(i))=0Thestudentizedresidualisei*=[yi–b(i)xi]/si(i)Where,si(i)isthestandarderroroftheregressionwithoutobservationi.Ifthestudentizedresidualsthataregreaterthan1.96inabsolutevaluecanberegardedasoutliersandshouldreceivespecialattention.InStata,it’seasytocalculatethestudentizedresiduals,youcanusethefollowingcommandafterregressionPredictrstud,rstudente(i)=yi–b(i)xixi第25頁,課件共29頁,創(chuàng)作于2023年2月OutlierinaModelofPublicSpending,(HR,Ex7.3)In“prdata\ex73.txt”exp=-45.698+3.234aid+0.00019inc-0.597popPredictrstud,rstudent/*calculatethestudentizedresiduals*/The7thand14thobservationmaybeoutlier.Omit7thobservationandestimateagainexp=-7.08+2.365aid+0.00018inc-0.426popDummyvariablemethodtocalculatestudentizedresidualsGen

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論