1 / 11

MACROECONOMETRICS

MACROECONOMETRICS. LAB 4 – VARs and VECMs. ROADMAP. Everything is by definition linked with everything? Estimating VARs Estimation and forecasting IRF VECM All about STATA . Dataset. Timing Quarterly data, Jan. 1995 – Dec. 2004 Data GDP Consumption GDP deflator M3

pooky
Download Presentation

MACROECONOMETRICS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MACROECONOMETRICS LAB 4 – VARs and VECMs

  2. ROADMAP • Everything is by definition linked with everything? • Estimating VARs • Estimation and forecasting • IRF • VECM • All about STATA 

  3. Dataset • Timing • Quarterly data, Jan. 1995 – Dec. 2004 • Data • GDP • Consumption • GDP deflator • M3 • Quarter dummies

  4. STATA (1) • set memory 99m • set matsize 800 • Open downloaded file • Generate real variables: • Real GDP: gen rGDP=GDP/def_CPI • Real consumption • Generate logs (same way) • Log (realGDP) • Log (realconsumption) • Log (def_CPI) • Log (m3)

  5. STATA (2) • Graphing • twoway (line lrpkb lrconsumption if date<q(2004.4)) (or alternatively, using the menu) • twoway (line lm3 ldef_CPI if date<q(2004.4)) (or alternatively, using the menu) • VARs • var lrpkb ldef_CPI lrconsumption lm3, exog(_q*)

  6. STATA (3) • Diagnosis • Testing for number of lags • varsocvariables, maxlag(3) • Testing for VAR stability • varstable • Testing for Granger causality • vargranger • Testing for autocorrelation • varlmar

  7. STATA (4) • Impulse-response functions • Starting • cap irf drop • Creating (Option #1) • varbasic lrpkb lrconsumption ldef_CPI lm3 if date<=q(2004q4), lags(1/3) • Creating (Option #2) • varirf create irf, set(irf, replace) • varirf graph irf, i(lrpkb) r(lrconsumption) / UNIQUE SHOCK/ AND • varirf graph oirf, i(lrpkb) r(lrconsumption) /ORTHOGONAL SHOCK/

  8. STATA (5) • Forecasting • Computing • varfcast compute, step(8) dynamic(q(2005.1)) • Graphing • varfcast graph lrconsumption ldef_CPI lm3 lrpkb

  9. STATA (6) • No. of cointegrating relations (Johansen trace test for the rank) • vecrank lrconsumption ldef_CPI lrpkb lm3, sindicators(_q*) lags(3)

  10. STATA (7) • VECM • vec lrconsumption ldef_CPI lrpkb lm3, rank(3) sindicators(_q*) lags(2) REMEMBER: Cointegrating vectors not interpretable • Testing for stability • vecstable • Testing for autocorrelation • veclmar

  11. STATA (8) • Testing for long run relationships (examples the same as in the lecture) • constraint 1 [_ce1]lrconsumption=-1 • constraint 2 [_ce1]ldef_CPI • constraint 3 [_ce1]lm3 • constraint 4 [_ce2]lm3=-1 • constraint 5 [_ce2]lrconsumption • constraint 6 [_ce2]ldef_CPI=1 • constraint 7 [_ce2]lrpkb=1 • vec lrconsumption ldef_CPI lrpkb lm3, rank(2) sindicators(_q*) lags(3) dforce bconstraints(1/7)

More Related