Laubach and Williams RESTAT 2003

Use this forum for posting example programs or short bits of sample code.

Laubach and Williams RESTAT 2003

Postby TomDoan » Tue Apr 08, 2014 2:42 pm

This estimates the two-observable models (real GDP and inflation) from Laubach and Williams(2003), "Measuring the Natural Rate of Interest", Review of Economics and Statistics, vol. 85, no 4, 1063-1070. A similar model with multiple observables with a combination of regression equations and latent variables is Fabiani & Mestre(2004).

model1.rpf
Program file
(7.55 KiB) Downloaded 1157 times

nr2_0902.dat
Data file
(15.12 KiB) Downloaded 808 times
TomDoan
 
Posts: 5696
Joined: Wed Nov 01, 2006 5:36 pm

Re: Laubach and Williams RESTAT 2003

Postby andronelopez » Fri Oct 03, 2014 10:24 am

Hi,

Can anyone tell me where the lamg estimate of 0.11 in the second stage comes from? It should be the ratio between two s.e but I dont find them.


[nonlin(parmset=peglam2) lamg=.11]

thanks
andronelopez
 
Posts: 2
Joined: Fri Oct 03, 2014 10:03 am

Re: Laubach and Williams RESTAT 2003

Postby TomDoan » Fri Oct 03, 2014 12:44 pm

It's used here, so it's the ratio of the two standard deviations of the shocks.

frml swf = %diag(||sig4^2,(lamg*sig4)^2||)
TomDoan
 
Posts: 5696
Joined: Wed Nov 01, 2006 5:36 pm

Re: Laubach and Williams RESTAT 2003

Postby andronelopez » Mon Oct 13, 2014 10:04 am

Thanks

Is the value lamg=.11 used as an initial value for the estimation?
andronelopez
 
Posts: 2
Joined: Fri Oct 03, 2014 10:03 am

Re: Laubach and Williams RESTAT 2003

Postby TomDoan » Mon Oct 13, 2014 11:18 am

No. It looks like LAMG gets pegged to some value in each of the model estimations.
TomDoan
 
Posts: 5696
Joined: Wed Nov 01, 2006 5:36 pm

Re: Laubach and Williams RESTAT 2003

Postby asmith05 » Sun Jun 28, 2015 11:06 pm

Hi Tom,

I have a question about this replication and the method used in the paper. After reading the paper it seems the sequential estimation used in this paper is necessary to pin-down values of lamg and lamz. The first stage for example estimates a simple model of potential GDP assuming trend growth (g) is constant and also omitting the real-rate gap from the IS equation. After getting this estimate of ystar (potential GDP), the authors use a result from Stock and Watson (1998, Median Unbiased Estimation of Coefficient Variance in a Time-Varying Parameter Model) which provides a way to estimate lamg. The Stock and Watson approach seems to amount to taking the estimate of ystar and regressing the growth rate of ystar on a constant and then obtain the Andrews and Ploberger (1994, Optimal Tests When a Nuisance Parameter is Present Only Under the Alternative) exponential wald statistic for a structural break at an unknown date. This exponential wald statistic is then transformed (via Stock and Watson's Table 3) into an estimate of lamg.

My question is as follows:

Stock and Watson (1998) provide in Table 3 Median Unbiased Estimators under a normalization that "D=1." It is not clear to me how to normalize the regression of ystar growth on a constant to generate the appropriately normalized exponential wald statistic. This is my approach to implementing this into the code (acknowledging the fact that I am not sure about the normalization):
Code: Select all

set ystar %regstart() %regend() = xstates(t)(1)
set g_ystar = ystar - ystar{1}
linreg g_ystar
# constant
@RegHBreak



Then one would want to go look-up the "Andrews-Ploberger Test Statistic" in Stock and Watson's Table 3. Does this look like the right approach to implementing? Also, do you have a suggestion on this normalization?

Thanks for any input!
asmith05
 
Posts: 11
Joined: Thu Mar 24, 2011 8:33 pm

Re: Laubach and Williams RESTAT 2003

Postby GAM2016 » Wed May 25, 2016 7:33 am

Hello,
I have a problem with the Laubach and Williams’ model. Here the direct link to the paper: http://www.frbsf.org/economic-research/files/wp2015-16.pdf
In fact, your rats program allow only the result on the page 12 (not for the page 19)
Can anyone know a solution?
Also, I have a problem with this line on the code:

set trend=t
set btrend1=%max(t-1973:4,0)
set btrend2=%max(t-1995:2,0)

Many thanks in you return ;)

Here is the whole code :
Attachments
model1.rpf
(7.55 KiB) Downloaded 48 times
GAM2016
 
Posts: 2
Joined: Wed May 25, 2016 3:16 am

Re: Laubach and Williams RESTAT 2003

Postby TomDoan » Wed May 25, 2016 9:54 am

You posted a newer Laubach-Williams paper. I assume you're talking about the original working paper. Page 19 is simply a graph of the filtered output against the smoothed output. The filtered output is obtained by running the DLM (I'm not sure which one is used there) with TYPE=FILTER rather than TYPE=SMOOTHED.

You're missing a space between the series name and the = in your SET instructions.
TomDoan
 
Posts: 5696
Joined: Wed Nov 01, 2006 5:36 pm

Re: Laubach and Williams RESTAT 2003

Postby GAM2016 » Thu May 26, 2016 3:16 am

Hello,
Many thanks you for answer me and sorry for the wrong link.
I still have 3 problems to resolve and I will be grateful for your help!

1) On the new Laubach-Williams paper,I don’t understand how we get the Standard LW’s curve with rats program (page 28 ) http://www.frbsf.org/economic-research/files/wp2015-16.pdf

2) In your rats code, about the previous line on the code, I don’t understand how we get the dates 1973 and 1995

3) Finally, always in the code (about Phillips curve), I don’t understand how we get 0.42 and 0.58? Here is the few lines on the code from the whole code:
Phillips curve
*
linreg pceinflation 1961:1 *
# gap{1} pceinflation{1} pi3{2} pi5{5} pioilgap{1} piimpgap{0}
compute b3=%beta(1),b1=%beta(2),b2=%beta(3),b4=%beta(5),b5=%beta(6),sig2=sqrt(%seesq)
*
nonlin(parmset=peglam3) lamg=.042 lamz=sqrt(2)*.058

Thank you a lot!!
Attachments
model1.rpf
(7.55 KiB) Downloaded 42 times
GAM2016
 
Posts: 2
Joined: Wed May 25, 2016 3:16 am

Re: Laubach and Williams RESTAT 2003

Postby TomDoan » Thu May 26, 2016 10:04 am

GAM2016 wrote:Hello,
Many thanks you for answer me and sorry for the wrong link.
I still have 3 problems to resolve and I will be grateful for your help!

1) On the new Laubach-Williams paper,I don’t understand how we get the Standard LW’s curve with rats program (page 28 ) http://www.frbsf.org/economic-research/files/wp2015-16.pdf


I'm not sure which of the models is the "Standard LW", but that's just the smoothed estimates from it, for instance, like the NRR graphed in the final graph of the model1.rpf program.

GAM2016 wrote:2) In your rats code, about the previous line on the code, I don’t understand how we get the dates 1973 and 1995


That came out of one of the authors' Gauss programs. Since it's just used to generate a crude estimate of potential GDP in order to get guess values, the precise values really don't matter.

GAM2016 wrote:3) Finally, always in the code (about Phillips curve), I don’t understand how we get 0.42 and 0.58? Here is the few lines on the code from the whole code:
Phillips curve
*
linreg pceinflation 1961:1 *
# gap{1} pceinflation{1} pi3{2} pi5{5} pioilgap{1} piimpgap{0}
compute b3=%beta(1),b1=%beta(2),b2=%beta(3),b4=%beta(5),b5=%beta(6),sig2=sqrt(%seesq)
*
nonlin(parmset=peglam3) lamg=.042 lamz=sqrt(2)*.058


You would have to ask the authors about that. They make clear that you can't freely estimate all the variances, but the source of the pegs seems to vary from model to model.
TomDoan
 
Posts: 5696
Joined: Wed Nov 01, 2006 5:36 pm

Re: Laubach and Williams RESTAT 2003

Postby aubide » Sat Oct 15, 2016 6:18 pm

What are the FRED codes of the data in nr2_0902.dat? I would like to update the model, but want to make sure I am not mixing and matching series. Thank you.
aubide
 
Posts: 4
Joined: Tue Oct 06, 2015 11:52 am

Re: Laubach and Williams RESTAT 2003

Postby TomDoan » Sat Oct 15, 2016 7:12 pm

This is the authors Gauss code to create the working data file from raw data. However, their zip didn't include the raw data itself. I don't know if their data appendix has enough specifics to figure out the source series.


Code: Select all
/* ----------------------------------------------------------------------
   rst_data.g: Reads raw data from text file nr2_0902.q, and transforms
   the data as described in the appendix to Laubach-Williams,
   FEDS 2001-56. Last modified 09/03/02.
---------------------------------------------------------------------- */

output file = nr2_0902.dat reset;
screen off;
format /rd 9,4;
load daq[218,10] = nr2_0902.q;
daq[1:76,8] = daq[1:76,7]*daq[77,8]/daq[77,7];

mv = miss(0,0);
x = reshape(mv,218,7);

x[.,1:2] = ln(daq[.,2:3]);
x[.,3] = daq[1:45,4]|daq[46:218,5];
x[2:218,5] = 400*ln(daq[2:218,6]./daq[1:217,6]);
x[2:218,6] = 400*ln(daq[2:218,8]./daq[1:217,8]);
x[.,7] = 100*((1+daq[.,10]/36000)^365-1);
x[69:218,7] = daq[69:218,9];

yr = (x[10:218,3]+x[9:217,3]+x[8:216,3]+x[7:215,3])/4;
xr = x[6:218,3]~x[5:217,3]~x[4:216,3]~ones(213,1);
i = 1;
do while i <= 170;
beta = invpd(xr[i:i+39,.]'xr[i:i+39,.])*xr[i:i+39,.]'yr[i:i+39];
x[48+i,4] = xr[i+43,.]*beta;
i = i+1;
endo;

x;

end;
TomDoan
 
Posts: 5696
Joined: Wed Nov 01, 2006 5:36 pm

Re: Laubach and Williams RESTAT 2003

Postby RJS » Thu Dec 08, 2016 8:35 am

aubide wrote:What are the FRED codes of the data in nr2_0902.dat? I would like to update the model, but want to make sure I am not mixing and matching series. Thank you.


Hi,

Don't know if you've resolved your issue yet, but the authors publish the input data and the core results publicly. Just a case of Googling "Laubach Williams natural rate" or something similar and you should find a link to an Excel file on the first return page (current link is: www.frbsf.org/economic-research/files/L ... mates.xlsx). They update their estimates quarterly, so there will be further updates as you go along.

If you are looking to compile the data series yourself, I would recommend looking at the data appendix of their paper to get the names of the data series and the sources they tap: https://www.federalreserve.gov/pubs/fed ... 156pap.pdf

Most of it you can find on the BEA website: http://www.bea.gov/ just go to the interactive tables in the gross domestic product and the personal income and outlays sections to get all the data on GDP and price indices. For the interest rate data, that's where I would use the Fred database. Just input the relevant search terms for the Fed Funds and NY Fed Discount rates.

Hope that helps.

All the best,

Rupert
RJS
 
Posts: 9
Joined: Thu Dec 08, 2016 4:27 am


Return to Examples and Sample Code

Who is online

Users browsing this forum: No registered users and 1 guest