Morley, Nelson and Zivot(2003)

Posted:
Mon Jun 04, 2012 12:00 pm
by TomDoan
This is a replication file for Morley, Nelson & Zivot(2003), "Why Are the Beveridge-Nelson and Unobserved-Components Decompositions of GDP So Different?,"
The Review of Economics and Statistics, vol. 85(2), 235-243. This examines the implications of allowing for correlation in the shocks in a standard unobserved components model. (UC models generally assume uncorrelated shocks). Related work is Perron and Wada(2009) (
http://www.estima.com/forum/viewtopic.php?f=8&t=1504), which allows for a break in the trend rate in the UC model.
lgdp.txt
- Data file
- (3 KiB) Downloaded 50 times
Morley Nelson Zivot (2003) Why Are the

Posted:
Sun Jun 10, 2012 7:05 am
by hardmann
Dear Tom:
I always study winrats by replicating examples, so I encounter lots problem.
Morley Nelson Zivot (2003) considered that BN and UC are identical if relaxing the correlation between trend and cycle innovations for U.S. real GDP 1947Q1--1998Q2. Of course, the results of the UC-0(zero correlation) and UC-UR ( correlation ) are different.
Perron & Wada(2009) re-examined MNZ works, and argued that there is a break around 1973Q1 of GDP, once account for it, all methods yield the same results.
I still want to prove which is the best model among UC-0, UC-UR and BN models without break. For avoid break, I split that sample into two subsample 1947Q1-1973Q1 and 1973Q1-1998Q2. However, with first subsample, the series follows ARMA(2,2) process, but UC-0 and UC-UR cannot converge, BN is ok. With second subsample, the series follows AR(1), UC-0 and UC-UR can converge but both their sn and sne are zero.
Why do subsample go wrong due to smaller sample?
Best regard
Hardmann
Re: Morley Nelson Zivot (2003) Why Are the

Posted:
Sun Jun 10, 2012 8:14 am
by TomDoan
Models don't always work. It is quite possible that even the Perron and Wada "fix" doesn't really adequately describe the difference between the data pre- and post-1973.
Re: Morley Nelson Zivot (2003) Why Are the

Posted:
Sun Jun 10, 2012 11:50 pm
by hardmann
IF I use UC-0 and UC-UR models to estimate the U.S. GDP 1947Q1-1973Q1. How I can deal wuth disconverge problem. I had tried pmothod=simple or genetic.
- Code: Select all
open data lgdp.txt
calendar(q) 1947
data(format=free,org=columns) 1947:01 1973:01 lgdp
*
* Everything is run on 100*log data
*
set lgdp = 100.0*lgdp
*
@NBERCycles(down=recession)
*
* UC-0 decomposition with AR(2) cycle, fixed trend rate.
*
nonlin mu sn ph1 ph2 se
*
dec frml[rect] af
dec frml[vect] zf
dec frml[symm] swf
*
frml af = ||1.0,0.0,0.0|$
0.0,ph1,ph2|$
0.0,1.0,0.0||
frml zf = ||mu,0.0,0.0||
frml swf = %diag(||sn^2,se^2||)
*
compute [vect] c=||1.0,1.0,0.0||
compute [rect] f=%identity(2)~~%zeros(1,2)
*
* Get initial guess values
*
filter(type=hp) lgdp / gdp_hp
set gap_hp = lgdp - gdp_hp
linreg gap_hp
# gap_hp{1 2}
compute ph1=%beta(1),ph2=%beta(2),se=sqrt(%seesq)
set trend = t
linreg gdp_hp
# constant trend
compute mu=%beta(2)
compute sn=sqrt(.1*%seesq)
*
* In order to be comparable with the BN decomposition (which is a
* "filtered" calculation), this uses filtered rather than smoothed
* estimates of the components.
*
dlm(presample=ergodic,a=af,z=zf,sw=swf,c=c,f=f,y=lgdp,pmethod=simplex,piter=5,method=bfgs,type=filter) / states0
*
set cycle0 = states0(t)(2)
set trend0 = states0(t)(1)
*
graph(footer="Figure 1 UC-0 Cycle, US Real GDP. Percent Deviation from Trend",$
shaded=recession)
# cycle0
*
* Estimation of unrestricted ARIMA(2,1,2) model
*
boxjenk(maxl,ar=2,diffs=1,ma=2,const) lgdp
*
* Generation of BN trend implied by that. Compute the persistence
* measure of the ARMA model (sum of MAR coefficients).
*
summarize (1+%beta(4)+%beta(5))/(1-%beta(2)-%beta(3))
*
* Compute accumulation of psi(1)*residuals + trend rate
*
set incrbn = %sumlc*%resids+%beta(1)
acc incrbn / trendbn
*
* Normalize value of trend based upon starting value of data. Compute
* cycle as residual.
*
set trendbn = trendbn+lgdp(1947:1)
set cyclebn = lgdp-trendbn
graph(footer="Figure 2 Beveridge-Nelson Cycle, US Real GDP",$
shaded=recession)
# cyclebn
*
* Unrestricted UC model, allowing for correlation between the shocks
*
compute rhone=0.0
nonlin(parmset=fullset) mu sn ph1 ph2 se rhone
*
frml zf = ||mu,0.0,0.0||
frml swf = ||sn^2|rhone*sn*se,se^2||
dlm(a=af,z=zf,sw=swf,c=c,f=f,y=lgdp,$
presample=ergodic,parmset=fullset,method=bfgs,type=filter) / statesur
set cycleur = statesur(t)(2)
set trendur = statesur(t)(1)
*
* Save the log likelihood and estimated coefficients for future use
*
compute baselogl=%logl,baseparms=%parmspeek(fullset)
*
graph(footer="Figure 3 UC-UR Cycle, US Real GDP",$
shaded=recession)
# cycleur
Re: Morley Nelson Zivot (2003) Why Are the

Posted:
Mon Jun 11, 2012 9:32 am
by TomDoan
Add the option CONDITION=2 to the DLM instructions. The AR(2) cycle can be near unit root at which there is a discontinuity in the likelihood function. By conditioning on the first 2 data points (one comes with the forced unit root, the other for the possibility of the second one), you eliminate the term that causes the discontinuity.
Re: Morley Nelson Zivot (2003) Why Are the

Posted:
Mon Jun 11, 2012 10:32 am
by hardmann
problem resolved with added condition=2 option
Re: Morley, Nelson and Zivot(2003)

Posted:
Thu Jun 14, 2012 1:09 pm
by moderator
Merged questions with post presenting original example code.