您好,欢迎访问三七文档
1Maximum-likelihoodestimationofendogenousswitchingregressionmodelsMichaelLokshinZurabSajaiaTheWorldBank,USTheWorldBank,USmlokshin@worldbank.orgzsajaia@worldbank.orgAbstract.ThisarticledescribesthemovestaySTATAcommand,whichimplementsthemaximumlikelihoodmethodtoestimatetheendogenousswitchingregressionmodel.Keywords:Endogenousvariables,Maximumlikelihood,Limited-dependentvariables,Switchingregression.1IntroductionInthisarticlewedescribetheimplementationofthemaximumlikelihood(ML)algorithmtoestimatetheendogenousswitchingregressionmodel.Inthismodelaswitchingequationsortsindividualsovertwodifferentstates(withoneregimeobserved).Theeconometricproblemofestimatingamodelwithendogenousswitchingarisesinavarietyofsettingsinlaboreconomics,themodelingofhousingdemand,andthemodelingofmarketsindisequlibrium.Forexample:•Theunion-nonunionmodelofLee(1978)investigatesthejointdeterminationoftheextentofunionismandtheeffectsofunionsonwagerates.Thepropensitytojoinauniondependsonthenetwagegainsthatmightresultfromtradeunionmembership.Thepaperexplicitlymodelstheinterdependencebetweenthewagegainequationandtheunionmembershipequation.•AdamchikandBedi(2000)usedatafromPolandtoexaminewhetherthereareanywagedifferentialsofworkersinthepublicandprivatesectors.Thepaperinterpretssectoralwagedifferentialsintermsofexpectedbenefitsandthedesirabilityofworkinginaparticularsector.•Thorst(1977)modelsthehousing-demandproblembyexaminingtheexpendituresonhousingservicesinowner-occupiedandrentalhousing.Thestudymodelstheindividualdecisiontoownorrentahouseandtheamountspentonhousingservices.Modelswithendogenousswitchingcanbeestimatedoneequationatatimeeitherbytwo-stepleastsquareormaximumlikelihoodestimation.However,bothoftheseestimationmethodsareinefficient.Inaddition,theseapproachesrequirepotentiallycumbersomeadjustmentstoderiveconsistentstandarderrors.Themovestaycommand,ontheotherhand,implementsthefullinformationMLmethod(FIML)tosimultaneouslyestimatebinaryandcontinuouspartsofthemodelinordertoyield2consistentstandarderrors.Thisapproachreliesonjointnormalityoftheerrortermsinthebinaryandcontinuousequations.2MethodsConsiderthefollowingmodel,whichdescribesthebehaviorofanagentwithtworegressionequations,andacriterionfunctionIithatdetermineswhichregimetheagentfaces1:)3.2(0:2Regime)2.2(1:1Regime00)1.2(0122221111=+==+=≤+=+=iiiiiiiiiiiiiiIifXyIifXyuZifIuZifIεβεβγγHere,yjiarethedependentvariablesinthecontinuousequations,X1andX2arevectorsofweaklyexogenousvariables,andβ1,β2,andγarevectorsofparameters.Assumethatui,ε1iandε2ihaveatrivariatenormaldistribution,withmeanvectorzeroandcovariancematrix:=Ω223121212....σσσσσuwhere2uσisavarianceoftheerrortermintheselectionequation,and21σand22σarevariancesoftheerrortermsinthecontinuousequations.σ21isacovarianceofuiandε1iandσ31isacovarianceofuiandε2i.Thecovariancebetweenε1iandε2iisnotdefinedasy1iandy2iareneverobservedsimultaneously.Wecanassumethat12=uσ(γisestimableonlyuptoascalarfactor).Themodelisidentifiedbyconstructionthroughnon-linearities.Giventheassumptionwithrespecttothedistributionofthedisturbanceterms,thelogarithmiclikelihoodfunctionforthesystemofequation(2.2-2.3)is:)4.2()]}/)/(ln())(1[ln()1()/)/(ln()([ln({ln222211111σσεησσεηiiiiiiiiifFwIfFwIL+−−++=∑=whereFisacumulativenormaldistributionfunction,fisanormaldensitydistributionfunction,wiisanoptionalweightforobservationiand2,11)/(2=−+=jZjjjijijiρσεργη1ThediscussioninthissectiondrawsfromMaddala(1983)p.223-224.3where12211σσσρu=isthecoefficientofcorrelationbetweenε1anduand22312σσσρu=arethecoefficientsofcorrelationbetweenε2iandui.Tomakesurethatestimatedρ1,ρ2areboundedbetween–1and1andestimatedσ1,σ2arealwayspositive,themaximumlikelihooddirectlyestimateslnσ1,lnσ2andatanhρ:−+=jjjρρρ11ln21atanhAfterestimatingthemodel’sparametersthefollowingconditionalandunconditionalexpectationscouldbecalculated:)10.2())(1()(),0|()9.2()()(),1|()8.2())(1()(),0|()7.2()()(),1|(:nsexpectatiolConditiona)6.2()|()5.2()|(:nsexpectationalUnconditio22222222122211211111111122221111iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiZFZfxxIyEZFZfxxIyEZFZfxxIyEZFZfxxIyExxyExxyEγγρσβγγρσβγγρσβγγρσβββ−−==+==−−==+====3Themovestaycommand3.1Syntaxmovestayisimplementedasad2MLevaluatorthatcalculatestheoverallloglikelihoodalongwithitsfirstandsecondderivatives.Thecommandallowsforweights,robustestimation,aswellasthefullsetofoptionsassociatedwithStata’smaximumlikelihoodprocedures.Thegenericsyntaxforthecommandis:movestay(depvar1[=]varlist1)[(depvar2=varlist2)][weight][ifexp][inrange],select(depvar_s=varlist_s)[robustcluster(varname)maximize_options]pweights,fweightsandiweightsareallowed.Incaseswhentheexplanatoryvariablesintheregressionsarethesameandthereisonlyonedependentvariable,onlyoneequationneedbespecified.Alternatively,whenthesetofexogenousvariablesinthefirstregressionisdifferentfromthesetofexogenousvariablesinthesecondregressionand/orthedependentvariablesaredifferentbetweenthetworegressions,bothequationsmustbespecified.4Thecommandmspredictcanfollowmovestaytocalculatethepredictivestatistics.Thestatisticscouldbebothinandoutofthesample;t
本文标题:movestay
链接地址:https://www.777doc.com/doc-7216323 .html