中级计量经济学课件_第1页
中级计量经济学课件_第2页
中级计量经济学课件_第3页
中级计量经济学课件_第4页
中级计量经济学课件_第5页
已阅读5页,还剩74页未读 继续免费阅读

下载本文档

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

文档简介

第五讲性响(QualitativeResponseBinaryResponseModels:LinearProbabilityModel(LPM),LogitandProbitMultinomialResponseModels:MultinomialLogitandMultinomialProbitOrderedLogitandOrderedProbit第一节二值响应模型(BinaryResponse一、二值响应被解释变量(BinaryResponseExplained一个家庭拥有住房(Y=1)或不拥有住房(Y成年人劳动参与决定,参与(Y1)或不参与(Y夫妻双方都参加工作(Y1)或只一人参加工作(YY=1ifownshome,0X e,1000Y=1ifownshome,0X e,1000108211071要建立模型,研究收入(X)会如何影响拥有住房(Y=1)发生的概1452530455678二、线性概率模型(LinearProbabilityModel,模yൌβ଴଴βଵxଵ଴βଶxଶ଴଴β୩x୩଴ݕൌቊ1,成功(失败 失败(成功Eሺy|Xሻൌy1p0EሺyሻൌvarሺyሻൌEሾyൌEሺyሻሿଶൌሺ1ൌpሻଶp଴ሺ0ൌpሻଶሺ1ൌpሻൌpሺ1ൌEሺy|XሻൌXβൌp,0p଴1varሺy|XሻൌXβሺ1ൌXβሻൌpሺ1ൌpሻ例ൌൌ0.9457଴ 001ˆ0.10211个单位收入($1000,家庭拥有住房的概率增加1x12($12000)E(y|x12)0.94570.1021*12LPM模型存在的主要问题干绕项的非正态性,导致在小样本情况下推断y0ε 当y=1 1-β0- 当y=0 -β0- var(ε)p(1-p)(由贝努里分布得到又因为pE(yi|xiβ0+β1xi,所以ε的方差最终依赖于x,即具有异方差性。0E(yi|xi)1x值情况下都成立。比如上例中,预测yhat情况,有一些小于0,有一些大于1。110三、IndexModelsforBinaryResponseProbitandIndexpሺy|Xሻൌ ResponseprobabilitydependsonX.Index:Xβൌβ଴଴βଵxଵ଴ThefunctionGmapstheindexintotheresponseInmostapplication,Gisacumulativedistributionfunction(cdf)whosespecificformcansometimesbederivedfromanunderlyingeconomicmodel.IndexmodelswhereGisaCDFcanbederivedmoregenerallyfromanunderlyinglatentvariablemodel.yכൌXβ଴ yൌ1ሾyכ଴ሿ1ሾזሿistheindicatory*rarelyhasawell-definedunitofmeasurement.Forexample,y*mightbemeasuredinutilityunit.pሺyൌ1|Xሻൌpሺyכ଴ൌpሺXβ଴e଴ൌpሺe଴ൌൌ 0 0ProbitandLogitModelse:standard ୴మpሺyൌ1|XሻൌGሺXβሻൌ Ԅሺvሻdvൌeଶe:standardLogisticpሺyൌ1|XሻൌGሺXβሻൌΛሺXβሻൌ1଴expሺൌ

ஶ1଴expCumulativeDistributionFunctionFሺx;µ,sሻ 1଴eሺ୶Inthisequation,xistherandomvariable,μisthemean,andsisaparameterproportionaltothestandarddeviationProbabilityDistributionFunction eሺ୶fx;µ,

ൌsሺ1଴eሺ୶

1ൌ

1଴

1଴expሻ଴

ln ൰ൌ1ൌ:oddsratio(机会比率lnቀ଴ቁ:logofoddsratio(机会比率对数)orPartialIfxjis

pൌ∂pൌgሺXβሻβ,where Therefore,thepartialeffectofxjonpdependsonXthroughg(Xβ).IfG(·)isastrictlyincreasingcdf,asintheprobitandlogitcase,g(z)>0forallz.thesignoftheeffectisgivenbythesignofthemagnitudesofthecoefficientsareNOTdirectlycomparableacrossmodels,althoughtheratiosofcoefficientsonthe(roughly)continuousexplanatoryvariablesare.therelativeeffectsdonotdependonx:ப୮⁄ப୶ౠൌ Ifxkisabinaryexplanatoryvariable,thenthepartialeffectfromchangingxkfromzerotoone,holdingallothervariablesfixed,issimplyGሺβ଴଴βଵxଵ଴଴β୩ଵx୩ଵ଴β୩ሻൌGሺβ଴଴βଵxଵ଴଴umLikelihoodEstimationofBinaryResponseIndexY=0一般用最大似然法估计法估计参数。因为Y服从贝努里分布,我们有Pr(Yi=1)=piPr(Yi=0)=1-pi 于是观测到nY值的联合分布概率( f(Y,Y,...,Y)f(Y)pYi(1p

function对数,我们有对数似然函数(loglikelihoodfunction)为nlnf(Y1,Y2,...,Yn)[Yilnpi(1Yi)ln(1pin[YilnpiYiln(1pi)ln(1pin Yiln ln(1pi pi ) ...11

1 2 k 1e01x1,i2x2,i...kxk,ilnf(Y,Y,...,Y)

Y( ... n

1 2 kln(1e01x1,i2x2,i...kxk,i以得到β的参数估计。法得到β的估计值以使似然函数最大。lnfሺYଵ,Yଶ…,Y୬ሻൌ∑୬ሾY୧lnp୧଴ሺ1ൌY୧ሻlnሺ1ൌ୧ X଴ஒ ౬మ X଴ஒ ౬మൌ∑୧ଵ଴Y୧ln൬଴ஶe

మdv൰଴ሺ1ൌY୧ሻln൬1ൌ଴మ思考线性模型的最大似然估计(MLE)?β଴分布?:Asymptoticnormal(1)拥有住房与收入之logit/probit模STATA:e=x$14,000拥有住房,收入<$15,000不拥有住房,所以软件无法汇报Logit/Probit的估计值。Adepartmentstorewantstodevelopadiscriminantruletodeterminewhetherlocalcollegestudentsshouldbegivencreditforfutureforfuturepurchases.DuringtheprecedingtwoyearsthestorecollectedinformationfromstudentsthatweregivenLogit.logitNRISKNSEXDum_MAJOR1Dum_MAJOR2Dum_MAJOR3GPTAGELogitNumberof LR Prob> Loglikelihood=-Pseudo NRISK Coef.Std. [95%Conf.+Dum_MAJOR1 -Dum_MAJOR2 Dum_MAJOR1 -Dum_MAJOR2 Dum_MAJOR3 GPT|----AGE|-.--.HRS|-.---_cons note:4failuresand0successesmpley

ሻൌlog

ොൌ33.22ൌ0.62NSEX଴18um୫୨଴m୫଴5.01DumMୟ୨୭୰ଷൌ3.94GPTൌ0.55AGEൌeXො୰୧ୱ୩ൌ଴偏效应(partialNSEX=Male, ොComparedwithBusinessmajor,Major= ොMajor=Social ො୰୧ୱ୩Major= ො୰୧ୱ୩ ො୰୧ୱ୩ ො୰୧ୱ୩՝butnotsignificant ො୰୧ୱ୩՝拟合优度的测度pseudo-.tabulateRISKPredicted_Risk, |rowpercentage RISK GOOD BAD 8 9.20 GOOD 78 93.98 Total 86 50.59 pseudo-R2:最常用的是McFadden(1974)pseudo-McFaddenpseudoൌRଶൌ1ൌ 表示只有截距项的模型的对数似然为何可以用pseudo-R2刻划拟合优度nlnfY1Y2,.,Yn[Yilnpi1Yiln(1piY=0, lnf0,lnLlnL0如果解释变量均无解释能力,那么|lnL||lnL0|pseudo-R2通常情况下,|lnL|<|lnL0|,因此pseudo- <0ProbitprobitNRISKNSEXDum_MAJOR1Dum_MAJOR2Dum_MAJOR3GPTAGEProbit Numberof LR Prob> Loglikelihood=- Pseudo NRISK +Std. [95%NSEX|NRISK +Std. [95%NSEX|-Dum_MAJOR1 .- --Dum_MAJOR2Dum_MAJOR3..GPT|- --3.869698-AGE|- --.HRS|- ---_cons|

ොሺriskൌbadሻൌΦ൫19.07ൌ0.33NSEX଴。൯ൌeଶஶ |rowpercentage RISK GOOD BAD 8 9.20 GOOD 78 93.98 Total 86 50.59 dataLogit模型与Probit模型的比42 1logistic分布具有稍微平坦的尾部(fattails42 10logitprobitCDF0研究者选用logit模型。ThreeAsymptoticallyEquivalenceTests(allbasedonumlikelihoodestimation)LikelihoodRatio(LR)LRൌ2ሺlnL୳୬୰ୱ୲୰୧ୡ୲ൌlnL୰ୱ୲୰୧ୡ୲Underthenullhypothesiswithqexclusion ሺR଴arଵ൫R଴ሺR଴rሻTሾRar൫଴൯Rᇱଵ൫R଴H୭:଴βଵ଴2βଶൌൌ5βଶ଴3βଷൌ ቃ଴βଶ൩ൌቂ ൌ5 2଴5଴3଴

଴଴ଶ൯଴

0 ൦ov൫଴଴ଵ൯ ar൫଴v଴ଶ,଴ ൌ5 ଵ൯଴଴ଶ൯ a଴ଷ൯ ൌ52଴ଶ ଴5଴3଴H୭:βଵβଶൌgሺβሻൌβଵβଶ10 βሻ gβሻ Tgሺ଴ሻTar൫଴ቇ൩

gሺ଴ቈሺ଴ଵ଴ቊሾ଴ቈ

଴ଵ

a൫β൯ ଴,଴ଶ଴

ሿTቋ

൫଴ଵ଴

ൌov൫଴଴ଵ ar൫଴ሺ଴ଵ଴

ଵ൯଴2଴ଵ଴ଶov൫଴ଵ,଴ଶ൯଴

Reference:AllanW.GregoryandMichaelR.Veall,1985.FormulatingWaldTestsofNonlinearRestrictions.Econometrica,Vol.53,No.6(Nov.,1985),pp.1465-1468.MultinomialResponseUnorderedresponse,sometimescalledanominalHealthplanchoice:1/2/3;MultinomialLogitandMultinomialMultinomial

Pሺyൌj|Xሻ,jൌ0,1,2,…Forjൌ1,2,…,J,Pሺyൌj|Xሻ exp11଴୦

expForjൌ Pሺyൌ0|Xሻ PartialeffectsforthismodelareForcontinuousxk,wecan

1଴1଴

exp∂Pሺy ൌPሺyൌ

β୦୩exp୦ଵ 1଴∑୦ଵexpEventhedirectionoftheeffectisnotdeterminedbyAsimplerinterpretationofβ୨isgivenLogodds

ൌexp൫Xβ୨൯,forjൌ1,2,…,logቆP୨ሺX,βሻቇൌP଴ሺX, logቆP୨ሺX,βሻቇൌXሺβൌβP୦ሺX, umlikelihoodForeachitheconditionalloglikelihoodcanbewritten଴ܺ଴ሺߚሻൌ଴1ሾݕ଴ൌܺሿlogሾܺ଴ሺݔ଴,଴Asusual,weestimateβ izing

ܺMultinomialProbitUnderlyingutilityTheutilityfromchoosingalternativej଴ߚ଴଴ݔ଴଴ൌכݕLetyidenotethechoiceofindividuali izeכݕ,,…כݕ,כݕሺݔൌ଴ݕ Amoreflexibleassumptionisthatߙ଴hasamultivariatenormaldistributionwithcalledemultinomialprobitmodel.Theoretically,themultinomialprobitmodelisattractive,butishassomepracticalTheresponseprobabilitiesareverycomplicated,involvinga(J+1)-dimensionalintegral.Thiscomplexitynotonlymakesitdifficulttoobtainthepartialeffectsontheresponseprobabilities,italsomakes umlikelihoodestimation(MLE)infeasibleformorethanaboutfivealternatives.Example:SchoolandEmploymentDecisionsforYoungsch=home=work=.mlogitstatuseducexperexpersqblackify87==1,basecategory(0)Iteration0: loglikelihood=-1199.7182Iteration loglikelihood=-Iteration loglikelihood=-Iteration loglikelihood=-Iteration loglikelihood=-Iteration loglikelihood=-Multinomiallogistic Numberof LR Prob> Loglikelihood=- Pseudo status Coef.Std. [95%Conf.+ educ|educ|- ---exper|- --.expersq|- --black ._cons educ|- ---exper .expersq|- ---black -._cons estatus==0isthecomparison଴ሺhomeሻlogቆ଴ሺ

ቇൌ10.28ൌ0.67educൌ0.11experൌ0.01expersq଴ሻ଴ሺworkሻ ቇൌ5.54ൌ0.31educ଴0.85experൌ0.08expersq଴PሺPሺhomeሻ Pሺ

ൌൌ଴ሺhomeሻblackൌ1,logቆ଴ሺschoolሻቇ՛Themagnitudesaredifficulttointerpret.Insteadwecaneithercomputepartialeffectsorcomputedifferencesinprobabilities.Forexample,considertwoblackmen,eachwithfiveyearsofexperience.Ablackmanwith16yearsofeducationhasemploymentprobabilitythatis0.042higherthanamanwith12yearsofeducation,andtheat-homeprobabilityis0.072lower.଴ሺStatus expሺ10.28ൌ0.67educൌ0.11experൌ0.01expersq଴1଴expሺ10.28ൌ0.67educൌ0.11experൌ0.01expersq଴0.81blackሻ଴exp଴ሺStatus 1଴expሺ10.28ൌ0.67educൌ0.11experൌ0.01expersq଴0.81blackሻ଴exp଴ሺStatus 1଴expሺ10.28ൌ0.67educൌ0.11experൌ0.01expersq଴0.81blackሻ଴expwhereזൌ5.54ൌ0.31educ଴0.85experൌ0.08expersq଴Greene,W.H.andD.A.Hensher,2010.ModelingOrderedChoices:ACambridgeUniversityWooldridge,J.M.,2010.EconometricysisofCrossSectionandPanelData,2ndedition.TheMITPress.OrderedCreditrating:Bondrating:Healthstatus:Productquality:个人程度(Happiness:0/1/2/3/4/5)悲惨(凄惨?)=0略感痛苦=无感觉(没心没肺?)=有点快乐=较快乐=极度快乐、癫狂状态(convergetocase32)?没心没肺0<1<2<3<4<OrderedProbitandOrderedLogitUnderlyinglatentyכൌXβ଴ yכ:latentXdoesnotcontainaLetαଵ଴αଶ଴଴αJbeunknowncutpoints(orthresholdyൌ0ifyכ଴yൌ1ifαଵ଴כݕyൌ2ifαଶ଴כݕ଴αଷyൌJifyכ଴Giventhestandardnormalassumptionfore,itisstraightforwardtoderivetheconditionaldistributionofygivenX.Pሺyൌ0|XሻൌPሺyכ଴αଵ|XሻൌPሺXβ଴e଴αଵ|XሻൌΦሺαଵൌPሺyൌ1|XሻൌPሺαଵ଴כݕ଴αଶሻൌPሺαଵ଴ߚ଴ܺ଴ൌPሺαଵൌXβ଴ܺ଴αଶൌXβ|XሻൌΦሺαଶൌܺ଴αଷ|XሻൌPሺαଶൌXβ଴ܺ଴αଷൌXβ|XሻൌΦሺαଷൌXβሻൌൌPሺyൌJ|XሻൌP൫yכ଴αJ|X൯ൌP൫e଴αJൌXβหX൯ൌ1ൌΦሺαJα α α2‐Xβ Pሺyൌ0|Xሻ଴Pሺyൌ1|Xሻ଴଴PሺyൌJ|XሻൌReplacingΦwiththeLogitfunction,Λ,givestheorderedLogitumLikelihoodPartialIneithercase,wemustrememberthatβ,byitself,isoflimitedinterest.InmostcasewearenotinterestedinE(y*|X)=Xβ,asy*isan construct.Instead,weareinterestedintheresponseprobabilitiesP(y=j|X).பPబൌൌβԄሺαൌ பPౠൌβ

Xβ൯

—Xβሻ൧,0଴ܺ଴ ୨பPJൌβԄሺα— Forintermediate es1,2,…J-1,β୩doesNOTalwaysdeterminethedirectionoftheeffectfortheintermediate Notethat expሺൌൌ.oprobitrep77foreignlengthIteration loglikelihood=-Iteration loglikelihood=-Iteration loglikelihood=-Iteration loglikelihood=-Orderedprobit Numberof LR Prob> Loglikelihood=- Pseudo rep77 Coef.Std. [95%Conf. . . ..foreign|lengthmpg+_cut1 (Ancillary_cut2_cut3_cut4yൌPoor,ifyכ଴yൌFair,if10.1589଴כݕ଴yൌAverage,if11.21003଴כݕ଴yൌGood,if12.54561଴כݕ଴yൌExcellent,ifyכ଴13.98059כൌ1.704861foreign଴ length଴ Aswithmultinomiallogit,fororderedresponseswecancomputethepresentcorrectlypredicted,foreach easwellasoverall:ourpredicationforyissimplythe ewiththehighestestimatedprobability.第六讲时间序列模型(TimeSeries时间序列的平稳性及其检验单变量时间序列模型:ARIMA模型多变量时间序列模型:VAR模型波动性模型:ARCH和GARCH模型第一节时间序列的平稳性及其检验滞后(LagsTheobservationonthetimeseriesvariableYmadeatdatetisdenotedYt,andthetotalnumberofobservationsisdenotedT.DataFrequency:Theintervalbetweenobservations,thatis,theperiodoftimebetweenobservationtandobservationt+1,issomeunitoftimesuchasweeks,months,quarters(three-monthunits).ThevalueofYinthepreviousperiodiscalleditsfirstlaggedvalueor,moresimply,itsfirstlag,andisdenotedYt-1.Itsjthlaggedvalue(orsimplyitsjthlag)isitsvaluejperiodsago,whichisYt-RateofInflationAnnualRateFirst(Yt-Second(Yt-Third(Yt-......Lag运算LLYt=LYt-1=Yt-2LjYt=Yt-一阶差分(FirstThechangeinthevalueofYbetweenperiodt-1andperiodtisYt–Yt-1;thischangeiscalledthefirstdifferenceinthevariableYt.Inthetimeseriesdate,“Δ”(delta)isusedtorepresentthefirstdifference,sothat୲୲ΔY୲ൌ?Y୲ൌ୲Yଶൌ2Y୲ଵΔY୲ൌΔΔY୲ൌΔY୲ൌY୲ሻൌሺY୲ൌY୲ଵሻൌሺ୲

ሻൌY୲଴Y୲

୲ΔY୲ൌY୲ൌY୲ଵൌY୲ൌLY୲ൌሺ1ൌΔଶY୲ൌY୲ൌ2Y୲ଵ଴Y୲ଶൌY୲ൌ2LY୲଴LଶY୲ൌሺ1ൌ2L଴LଶሻY୲ൌLሻଶY୲ΔଷY୲ൌሺ1ൌ自然对数lnY୲ൌlogY୲ൌlnTwoManyeconomicseries,suchasgrossdomesticproduct(GDP),exhibitgrowththatisapproximayexponential,thatis,overthelongruntheseriestendstogrowbyacertainpercentageperyearonaverage;ifso,thelogarithmsoftheseriesgrowsapproximaylinearly.1,2,…,TlnሺGDP୲ሻൌα଴ ൌ1,2,…,Thestandarddeviationofmanyeconomictimeseriesisapproxima proportionaltoitslevel,thatis,thestandarddeviationiswellexpressedasapercentageoftheleveloftheseries;ifso,thestandarddeviationofthelogarithmoftheseriesisapproximayconstant.

୲୲logሺYሻlogሺY୭ሻ

ሺYൌY୭ሻ ሺ୭ሻ

log ሺY—log 1 1varሺlogሺY varሺYሻൌ GrowthRateൌY୲ൌY୲ଵൌΔY୲ΔlnሺYY୲

Y୲ ΔlnሺY୲ሻൌlnሺY୲ሻൌlnሺY୲二、平稳性(stationary)含义严平稳性 stationary)时间序{y1,y2,…,yt}的联合概率分布(jointdistribution){y1+k,y2+k,…,yt+k}的联合概率分布相同,我们就称yt是严平稳弱平稳性 stationary)时间序yt,如果其均值、方差是不随时间而变化,协方差仅依赖于观测E(yt)=var(yt)=E(yt–μ)2=cov(yt,yt+k)=γk=E[(yt-μ)(yt+k-μ)]=E[(yt+m-μ)(yt+m+k-我们通常所说时间序列的平稳性是指弱平稳性。Onerealizationoftheprocessateachtime三、两种常见非平稳随机过程(stochastic无漂浮随机(RandomWalkwithoutYt=Yt-1+noiseY1=Y0+Y2=Y1+e2=Y0+e1+Y3=Y2+e3=Y0+e1+e2+

Yt=Y0+E(Yt)=E(Y0+Σet)=Y0var(Yt)Yt=Yt-1+012324nois012324--- ---Yt=δ+Yt-1+Yt=1+Yt-1+四、伪回归 regression)现yt=yt-1+e1te1t~N(0,1)xt=xt-1+e2te2t~N(0,yt与xt之间应该没有关系,但是注意STATA回归结.pwcorre1e2, e1e1||e2-|.regytSource Numberofobs F( 198)=Model| 1 Prob> =Residual| R- = AdjR-squared=Total| 199 Root =yt Std. [95%Conf.+xt _cons .Durbin-Watsond-statistic( 200)=.gendy=yt-(1missingvalue.gendx=xt-(1missingvalue..regdySource Numberofobs F( 197) Model| 1 Prob> =Residual| 197 R- = AdjR-squared=-Total| Root =dy Std. [95%Conf.+dx - _cons - .Durbin-Watsond-statistic( 199)=四、平稳性检验对时间序列数据的回归分析中我们一般假设时间序列是平稳的,但是现实中的大多数时间序列都是非平稳的。为了避免伪回归现象,对时间序列首先要 100自协方差ഥሻX,Yሻ

ഥሻሺYഥሻNൌ ୧ഥ୲ഥ୲vY, ሻ

଴YൌഥሻሺYൌഥ ୲

T1

୲tYt-Yt-1..2.345678自相关系数(autocorrelationorserialcorrelationρൌcovሺX,ሺ ഥො

ൌഥሻଶ∑୬

୧ଵഥሻ୧rr ୧ ୧

୧j୲୦autocorrelationൌρY୲୨ටvarሺY୲ሻvarሺY୲STATA:.corrytL.yt +yt--. L1. .corrytL2.yt| +yt--.

L2. .corrytL20.yt| +yt--.

L20. .corrgramyt,- 1- Prob>Q[Autocorrelation][Partial1|------|------2-|-------3|------4-|------|5|------|6-|------|7-|------|8-|------|9-|-----||-----|-----||-----||-----|-|-----|-|-----||-----|-|----|-|----|-|----|-|----|---Autocorrelationsofyt=yt-1+Autocorrelationsofwhitenoise白噪声(WhiteAtimeseriesetiscalledwhitenoiseifetisasequenceofindependentandidenticallydistributed(i.i.d)randomvariableswithfinitemeanandvariance.Inparticular,ifetisnormallydistributedwithmeanzeroandvarianceσ2,theseriesiscalledGaussianwhitenoise.Forawhitenoiseseries,alltheACFsarezero.PortmanteauTestforWhiteBoxandPierce(1970)proposethePortmanteau୫ො଴଴asateststatisticforthenullhypothesisHo:ρଵൌρଶൌൌρ୫ൌ0againsttealternativehypothesisHo:ρ୧0forsomeiאሼ1,2,…,mሽ.Undertheassumptionthat{et}isaniidsequencewithcertainmomentconditions,Q*(m)isasymptoticallyachi-squaredrandomvariablewithmdegreesoffreedom.LjungandBox(1978)modifytheQ*(m)statisticasbelowtoincreasethepowerofthetestinfinitesamples: ොሺܕሻൌTሺT଴2ሻൌܺ଴ThedecisionruleistorejectHoifQሺmሻ଴χଶ,whereχଶdenotesthe100(1- percentileofachi-squareddistributionwithmdegreesoffreedom.Mostsoftwarepacketswillprovidethep-valueofQ(m).ThedecisionruleisthentorejectHoifthep-valueislessthanorequaltoα,thesignificancelevel..wntestqe1,lags(50)PortmanteautestforwhitenoisePortmanteau(Q)=Prob>=.wntestqe2,lags(50)PortmanteautestforwhitenoisePortmanteau(Q)=Prob>=.wntestqlny,lags(50)PortmanteautestforwhitenoisePortmanteau(Q)statistic=3865.0100Prob> .wntestqdlny,lags(50)PortmanteautestforwhitenoisePortmanteau(Q)statistic= Prob> AutocorrelationsofAutocorrelationsof-0.200.000.20ACFoflog(exchange ACFofAutocorrelationsofAutocorrelationsof-0.200.000.20平稳时间序列ACF特征:当k增大时,衰减非常快。单位根(unitroot)及其检验单位yt=ρyt-1+et,-1≤ρ≤୲ρ

଴ൌρሺρy୲ଶ଴e୲ሻ଴ρଶ

଴ρe୲

଴ൌρሺρy୲

଴ൌρଷy୲ଷ଴ρଶe୲ଶ଴ρe୲

଴ൌe୲଴ρe୲

଴ρଶe୲

଴ρଷe୲ଷ଴E(yt)=మvarሺyሻൌ୲covሺy

ሻൌ ୲ (2)-(Dickey-Fuller)单位根检验思yt=ρyt-1+方程两边同时减去Yt-1,得ytyt1(1)yt1或

ytyt1注意:不是用t检验,因为在原假设为真的情况下,δ从t分布,而服注意:原假设是具有单位根STATA结.dfullerDickey-Fullertestforunit Numberof 1%5%10%1%5%10% - - - -*MacKinnonapproximatep-valueforZ(t)=.dfullerDickey-Fullertestforunit Numberof 1%5%10%1%5%10% - - - -*MacKinnonapproximatep-valueforZ(t)=(3)AugmentedDickey-Fuller(ADF)通过以下三个模型完成:∆୲δ୲

L୨

଴∆y୲ൌα଴δy୲

଴୨第二节单变量时间序列模ARIMA模型经济知识,只有具备感变量的历史数据就够了,因而模型的制定和数据的一、ARIMA模型的特点ARIMA(AutoregressiveIntegratedMovingAverage)Box-Jenkins方法,是上世纪七十年代建立起来的。ARIMA模型两个特点:

଴其中et是白噪

଴2.AR模型的识别ACF(AutocorrelationFunction)PACF(PartialAutocorrelationρൌγ୩ൌcovሺy୲,y୲ PACFytyt-kyt-1,….,yt-k+1所带来的间接相关性之后,yt与yt-k之间的直接相关性。yt,yt-1,yt-2,….,yt-k+1,yt-PACF可以通过以下Yule-Walker方程求y୲ൌԄ଴଴Ԅଵy୲ଵ଴y୲ൌԄ଴଴Ԅଵy୲ଵ଴Ԅଶy୲ଶ଴y୲ൌԄ଴଴Ԅଵy୲ଵ଴Ԅଶy୲ଶ଴Ԅଷy୲ଷ଴…Autocorrelationsof-0.200.000.200.40Partialautocorrelationsof-0.200.00Autocorrelationsof-0.200.000.200.40Partialautocorrelationsof-0.200.000.200.40

ARmodel:ACF:衰减 AutocorrelationsofAutocorrelationsofPartialautocorrelationsof 利用AIC、SIC等信息准 AICൌT

଴Tൈሺ#ofSICൌൌ2lnሺlikelihoodሻ଴#ofparametersln AR模型

଴AR模型1-stepaheadො୲ሺ1ሻ଴଴଴଴ଵy୲଴଴ଶy୲ଵ଴଴ଷy୲ଶ଴ ଴଴୮y୲୮ଵොොሺ1ሻvar൫ො୲ሺ1ሻ൯ൌ2-stepaheadො୲ሺ2ሻ଴଴଴଴ଵy୲ଵ଴଴ଶy୲଴଴ଷy୲ଵ଴ ଴଴୮y୲୮ଶ଴଴ଵො଴଴ଷy୲଴୮y୲ොොොଵሻԄଵe୲ଵvar൫ො୲ሺ2ሻ൯ൌଵσଶ଴Ԅଶσଶ yprediction, yprediction,462三、MA(MovingAverage)模型模

୲଴଴୲଴

଴θଶe୲

଴଴θ୯e୲MA模型的识别AutocorrelationsofAutocorrelationsof-0.200.000.200.40Partialautocorrelationsof-0.40-0.200.000.200.40AutocorrelationsofPartialautocorrelationsofAutocorrelationsofPartialautocorrelationsof-0.40-0.200.00 MA模型的估计e0=MA模型的预测 yprediction, yprediction,-05--05 yprediction,one--Autocorrelationsof-0.40-0.200.000.200.40PartialAutocorrelationsof-0.40-0.200.000.200.40Partialautocorrelationsof-0.200.000.200.40 .arima.arimaa,ARIMASample:1-Numberof Wald Loglikelihood=-Prob> |a Std.z [95%Conf.

| | |||||| -.-.-+/sigma Note:Thetestofthevarianceagainstzeroisonesided,andthetwo-sidedconfidenceintervalistruncatedatzero.五、ARIMA(p,d,q)模型建模一般对估计的ARMAARMAAICSIC等第三节多变量时间序列VAR模型TheMotivationbehindVARsinThemotivationbehindVARsinmacroeconomicsrunsdeeperthanthestatisticalissues.Thelargestructuralequationsmodelsofthe1950sand1960swerebuiltonatheoreticalfoundationthathasnotprovedsatisfactory.ThattheforecastingperformanceofVARssurpassedthatoflargestructuralmodels—someofthelatercounterpartstoKlein’sModelIrantohundredsofequations—signaledtoresearchersamorefundamentalproblemwiththeunderlyingmethodology.TheKeynesianstylesystemsofequationsdescribeastructuralmodelofdecisions(consumption,investment)thatseemlooselytomimicindividualbehavior.Intheend,however,thesedecisionrulesarefundamentallyadhoc,andthereislittlebasisonwhichtoassumethattheywouldaggregatetothemacroeconomiclevelanyway.Onamorepracticallevel,thehighinflationandhighunemploymentexperiencedinthe1970swereverybadlypredictedbytheKeynesianparadigm.Fromthepointofviewoftheunderlyingparadigm,themosttroublingcriticismofthestructuralmodelingapproachcomesintheformof“theLucascritique”(1976)inwhichtheauthorarguedthattheparametersofthe“decisionrules”embodiedinthesystemsofstructuralequationswouldnotremainstablewheneconomicpolicieschanged,eveniftherulesthemselveswereappropriate.Thus,theparadigmunderlyingthesystemsofequationsapproachtomacroeconomicmodelingisarguablyfundamentallyflawed.Morerecentresearchhasreformulatedthebasicequationsofmacroeconomicmodelsintermsofamicroeconomicoptimizationfoundationandhas,atthesametime,beenmuchlessambitiousinspecifyingtheinterrelationshipsamongeconomicvariables.(FromGreene2003,p587)VectorAutoregressionVARܜܡൌ

଴ܜܡ଴

଴ܜܡ଴଴

଴ܘܜܡܘwhereutisavectorofnonautocorrelateddisturbances(innovations)withzeroandcontemporaneouscovariancematrixE(utut’)=∑.Thisequationsystemisavectorautoregression,orVAR.ې

ې

ܺܺ

ܺ ܺ ݕଶܺۑ ۑۑ ൌۑ..

ݕ଴

଴଴ଵݕ଴ܺܺ

ܺܺ ܺ

..ې..

ܺܺ

ܺ ܺ ݕଶܺ଴ ..଴ .. ..

.....଴

ଶଶ

ܺ଴଴

ݕ଴௧RolesofForecasting:researchershavefoundthatsimple,small-scaleVARswithoutapossiblyflawedtheoreticalfoundationhaveprovedasgoodasorbetterthanlarge-scalestructuralequationsystems.StudyingtheeffectsofpolicythroughimpulseresponseGrangerDefinitionsofGranger(1969)hasdefinedaconceptofcausalitywhich,undersuitableconditions,isfairlyeasytodealwithinthecontextofVARmodels.Thereforeithas equitepopularinrecentyears.Theideaisthatacausecannotcomeaftertheeffect.Thus,ifavariablexaffectsavariablez,theformershouldhelpimprovingtheofthelatterAnecessaryandsufficientconditionforxtbeingnotGranger-causalforzt,thatis,ztisnotGranger-causedbyxtifandonlyifA12,i=0fori=1,...,Forݔൌቂݕଶ௧ቃdoesnotGranger-causez=ybecauseA=0

Ontheotherhand,ztGranger-causesInappliedwork,itisoftenofinteresttoknowtheresponseofonevariabletoanimpulseinanothervariableinasystemthatinvolvesanumberoffurthervariablesaswell.Thus,onewouldliketoinvestigatetheimpulseresponserelationshipbetweentwovariablesinahigherdimensionalsystem.Tracingaunitshockinthefirstvariableinperiodt=0inthissystemwet= ଴ൌ଴ݕଶ,଴൩ൌ଴ݑଶ,଴൩ൌ t=

ܺଵൌ଴ݕଶ,ଵ൩ൌܣଵܺ଴ൌ 0.3൩଴0൩ൌ t= ܺଶൌ଴ݕଶ,ଶ൩ൌܣଵܺଵൌܣଵܣଵܺ଴ൌܣଶܺ଴ൌ 0.12൩଴0൩ൌ t ܺଷൌ଴ݕଶ,ଷ൩ൌܣଷܺ଴ൌ଴0.0370.0310.057൩଴0൩ൌ

y3‐>y3‐>y2y3‐>10 VAR→LetusconsidertheVAR(1)Ifthisgenerationmechanismstartsatsometimet=1,say,weThisformoftheprocessiscalledthemovingaverage(MA)Anotherwayto

ൌ௧ݕሻܮଵܣ௧ݑଵൌ଴ܫ଴ݒଵሻଵܣൌ଴ܫൌ௧ݕ଴ଶܮଶܣ଴ܮଵܣ଴଴ܫሺ଴ݒଵሻܮଵܣൌ଴ܫሺൌ௧ݑሻ ଴ܣଶ௧ݑଶܣ଴ଵ௧ݑଵܣ଴௧ݑ଴ݒଵሻܮଵܣൌ଴ܫሺൌ Notethatሺܫ଴ൌܣଵܮሻଵൌܫ଴଴ܣଵܮ଴ܣଶܮଶ଴ܣଷܮଷ଴ ResponsestoOrthogonalAproblematicassumptioninthistypeofimpulseresponseysisisthatashockoccursonlyinonevariableatatime.Suchanassumptionmaybereasonableiftheshocksindifferentvariablesareindependent.Iftheyarenotindependentonemayarguethattheerrortermsconsistofalltheinfluencesandvariablesthatarenotdirectlyincludedinthesetofyvariables.Thus,inadditiontoforcesthataffectallthevariables,theremaybeforcesthataffectvariable1,say,only.IfashockinthefirstvariableisduetosuchforcesitmayagainbereasonabletointerprettheΦicoefficientsasdynamicOntheotherhand,correlationoftheerrortermsmayindicatethatashockinvariableislikelytobe paniedbyashockinanothervariable.Inthatcase,settingallotherresidualstozeromayprovideamisleadingpictureoftheactualdynamicrelationshipsbetweenthevariables. If∑isapositivedefinite(k×k)matrix,thenthereexistsalower(upper)triangularmatrixPwithpositivemaindiagonalsuchthatଵΣሺܺଵൌܫ଴orΣൌFor ଴ 0൩ൌ 0଴଴ positionA=PP’wherePislowertriangularwithpositivemaindiagonal,issometimescalledCholesky ConsideraVARwithoutexogenousTheVARrepresentsthevariablesinytasfunctionsofitsownlagsandseriallyuncorrelatedinnovationsut.AlltheinformationaboutcontemporaneouscorrelationsamongtheKvariablesinytiscontainedin∑.Toseehowtheinnovationsaffectthevariablesinytafter,say,iperiods,rewritethemodelinitsmoving-averageformwhereμistheK*1time-invariantmeanofWecanthususeP-1toorthogonalizetheutandrewritetheaboveequationChoosingaPissimilartoplacingidentificationrestrictionsonasystemofdynamicsimultaneousequations.ThesimpleIRFsdonotidentifythecausalrelationshipsthatwewishto yze.ThusweseekatleastasmanyidentificationrestrictionsasnecessarytoidentifythecausalIRFs.So,wheredowegetsuchaP?Sims(1980)popularizedthemethodofchoosingPtobetheCholesky theorthogonalizedIRFs.ChoosingPtobetheCholesky positionof଴isequivalenttoimposingarecursivestructureforthecorrespondingdynamicstructuralequationmodel.TheorderingoftherecursivestructureisthesameastheorderingimposedintheCholesky position.Becausethischoiceisarbitrary,someresearcherswilllookattheOIRFswithdifferentorderingsassumedintheCholeskyeeGrangerCausality.GrangercausalityWaldProb>e224e2e2e42e24 enotGrangercausingdlinverstment Ho:dlconsumptionnotGrangercausing FailtoHo:dlinvestmentnotGrangereHo:dlconsumptionnotGrangereHo:dlinvestmentnotGrangercausingdlconsumption enotGrangercausingdlconsumption RejectInvestment Consumption ImpulseResponse95% orthogonalizedGraphsbyirfname,impulsevariable,andresponse005005results1, .varirftableoirf, e)Resultsfrom |step | | - | |- - | - | - | - | - | - | - 95%lowerandupperbounds(1)irfname=results1,impulse e,andresponse=Granger,C.W.J.,1969.Investigatingcausalrelationsbyeconometricmodelsandcross-spectralmethods,Econometrica37:424–438.Lütkepohl,H.2005.NewIntroductiontoMultipleTimeSeriesysis.NewYork:Springer.Juselius,K.2006.TheCointegratedVARModel:MethodologyandApplications.OxfordUniversityPress.Stock,J.H.,andM.W.Watson.2001.Vectorautoregressions.JournalofEconomics15:101–115.Sims,C.A.1980.Macroeconomicsandreality,Econometrica48:[6].Watson,M.W.1994.Vectorautoregressionsandcointegration.InVol.IVofHandbookofEconometrics,ed.R.F.EngleandD.L.McFadden.Amsterdam:第四节波动性模型:ARCHGARCH模一、金融时间序列数据特征原数据是随机(randomwalk)过程(非平稳的;波动性现象(volatilityFirstdifferenceofUS/UKexchange(January1973–October二、自回归条件异方差(AutoregressiveConditionalHeteroscedasticity,ARCH(1)Yt2var(| ) 1STATA结ARCHfamilySample:2to Numberof Wald Loglikelihood= Prob> | +

Std. [95%Conf. |- - - +

|L1 EngleARCHp

)0.0006Yt2var(| )2 ... 1 2 p三、广义自回归条件异方差模型(GeneralizedAutoregressiveConditionalHeteroscedasticity,GARCH)GARCH(1,1)模Yt2var(| )2 1 1GARCH(1,1)模ARCH()Lag运算:

Lyt=yt-L2yt=yt-1L2L23L3.... GARCH11)

122 1 12L2 1(1L)212

(1

(11L)2 (1L2L23L3 (1

2L22L22 3L32 (11L) 1t1 11 11 11 22 22 32 (11L) 1t1 11t2 11t3 11t4ARCHfamilyregressionSample:2to286Numberof=Loglikelihood=Prob>chi2==..|||Std.z[95%Conf. |- - - + L1 L1 - ln(exchange_rate)20.00010.22202 第七讲板数(PanelData第一节面板数据及面板数据模型一、面板数据(PanelDataorLongitudinalPanelData含PanelData包括两个维度,对每一横截面观测多横截面:i=1,2,…,时间序列:t=1,2,itKL………两个重要的面板数据集(PanelData(1)U.S.NationalLongitudinalSurveysofLaborMarketExperienceTheNationalLongitudinalSurveys(NLS)areasetofsurveysdesignedtogatherinformationatmultiplepointsintimeonthelabormarketactivitiesandothersignificantlifeeventsofseveralgroupsofmenandwomen.Formorethan4decades,NLSdatahaveservedasanimportanttoolforeconomists,sociologists,andotherresearchers.NLSGeneralNationalLongitudinalSurveyofYouth1997(NLSY97)--Surveyofyoungmenandwomenbornintheyears1980-84;respondentswereages12-17whenfirstinterviewedin1997.NationalLongitudinalSurveyofYouth1979(NLSY79)--Surveyofmenandwomenbornintheyears1957-64;respondentswereages14-22whenfirstinterviewedin1979.NLSY79ChildrenandYoungAdults--Surveyofthebiologicalchildr

温馨提示

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

评论

0/150

提交评论