MSVAR-BY-KROLZIG

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

EconometricModellingofMarkov-SwitchingVectorAutoregressionsusingMSVARforOxBYHANS-MARTINKROLZIGInstituteofEconomicsandStatisticsandNuffieldCollege,Oxford.December15,1998Contents1Introduction...........................................12Disclaimer...........................................23Oxversion...........................................24Installation...........................................25Mainfiles............................................26Dataorganization........................................27Markov-switchingvectorautoregressions...........................37.1Typesofregime-switchingmodels..........................37.2Markov-switchingvectorautoregressiveprocesses..................48Modelformulation.......................................99Examples............................................99.1Hamilton’smodeloftheUSbusinesscycle.....................99.2AnMS-VARmodelofinternationalbusinesscycles.................129.3AMarkov-switchingvectorequilibriumcorrectionmodel..............1410Notesandremarks.......................................19References...............................................19AGlossaryofMSVARfunctions.................................211IntroductionMSVAR(Markov-SwitchingVectorAutoregressions)isapackagedesignedfortheeconometricmodellingofuni-variateandmultipletimeseriessubjecttoshiftsinregime.Itprovidesthestatisticaltoolsforthemaximumlikeli-hoodestimation(EMalgorithm)andmodelevaluationofMarkov-SwitchingVectorAutoregressionsasdiscussedinKrolzig(1997b).Avarietyofmodelspecificationsregardingthenumberofregimes,regime-dependenceversusinvarianceofparametersetc.providesthenecessaryflexibilityforempiricalresearchandwillbeofusetoecono-metriciansintendingtoconstructandusemodelsofdynamic,non-linear,non-stationaryorcointegratedsystems.MSVARisaclasswritteninOx(seeDoornik,1998),andisusedbywritingsmallOxprogramswhichcreateanduseanobjectoftheMSVARclass.SomeknowledgeofOxwillberequiredtouseMSVAR.Oxisanobject-orientedmatrixlanguagewithacomprehensivemathematicalandstatisticalfunctionlibrary.Matricescanbeuseddirectlyinexpressions,forexampletomultiplytwomatrices,ortoinvertamatrix.Useoftheobjectorientedfeaturesisoptional,butfacilitatescodere-use.ThesyntaxofOxissimilartotheC,C++andJavaIbenefitedgreatlyfromcommentsofMikeClements,JurgenDoornik,JuanToroandCarolinaSierimo.1MSVARPACKAGE2languages.Thissimilarityismostclearinsyntaxitemssuchasloops,functions,arraysandclasses.TheMSVARclassderivesfromtheDatabaseclasstoallowtheeasyuseandexchangewithotherclassessuchasPcFiml.Anadditionalsimulationclass(indevelopment)allowsMonteCarloexperimentationofthefacilitiesintheestimationclass.2DisclaimerThispackageisfunctionalenoughtobeuseful,butbynomeansfinishedyet(seetheshorttodolistattheendofthispaper).Thispackageisprovidedasis,andyoumayuseitatyourownrisk.Pleasereportanyproblemsorsuggestionsforimprovementtotheauthor(email:Hans-Martin.Krolzig@nuffield.oxford.ac.uk).Thispackagemustbecitedwheneveritisused.3OxversionMSVARrequiresOxversion2.00orlater.Toruntheprograminx9.3underWindows95/NT:oxlkrotoYoucanalsouseOxRuntoruntheprograminx9.3underWindows3.1/95/NT.InthatcasetheoutputwillappearinGiveWin,insteadofontheMS-DOSconsole.MSVARiswrittenas100%pureOxcode,andwillalsoworkonUnixplatforms.4InstallationCreateamsvarsubdirectoryintheoxnpackagesdirectoryandputmsvar.zipinthatdirectoryandunzipmsvar.zip1intothatdirectory.Thisallowsforrunningfilesfromthatdirectory.MSVARusesthe#importstatement(introducedwithOx2.00)toallowconvenientrunningofthepackagefromanydirectory.Add#importpackages/msvar/msvaratthetopofyourfilestoachievethis.YoualsomightwanttoaddthemsvarsubdirectorytoyourOXPATHstatement.5Mainfilesmsvar.h–theheaderfilefortheMSVARclass;msvar.oxo–thecompiledsourcecode.hmk.h–theheaderfileforsomegeneralfunctionsusedbytheMSVARclass;hmk.oxo–thecompiledsourcecode.msvar.pdf–thisdocument.Theremainingfilesaresampleprogramsanddata.6DataorganizationThefollowingdatafilescanbereaddirectlyintoanMSVARobject:GiveWin(.in7/.bn7),spreadsheet(Excel,Lotus),ASCIIandGauss(.dht/.dat).ThisisexplainedintheOxmanual.1Availablefordownloadingthrough(VAR)modelshavebeenbecomethedominantresearchstrategyinempiricalmacroeconomicssinceSims(1980)andimplementedinprogramsasPcFiml(seeDoornikandHendry(1997)).TheMSVARclassprovidestoolstoestimateVARmodelswithchangesinregime.Whenthesystemissubjecttoregimeshifts,theparametersoftheVARprocessbecometime-varying.Buttheprocessmightbetime-invariantconditionalonanunobservableregimevariablestwhichindicatestheregimeprevailingattimet.LetMdenotethenumberoffeasibleregimes,sothatst2f1;:::;Mg.Thentheconditionalprobabilitydensityoftheobservedtimeseriesvectorytisgivenbyp(ytjYt1;st)=8:f(ytjYt1;1)ifst=1...f(ytjYt1;M)ifst=M;(1)wheremistheVARparametervectorinregimem=1;:::;MandYt1aretheobservationsfytjg1j=1.Thus,foragivenregimest,thetimeseriesvectorytisgeneratedbyavectorautoregressiveprocessoforderp(V

1 / 26
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功