FRegensburg wrote:Dear Mr Doan,
I was hoping to get some advice from you on how to adapt the BQ procedure to a country other than the US, and I apologise in advance for the pedestrian nature of my questions. (By the way, all I’m after really is the measure of the output gap predicted by the model, I’m aware that you’ve written a code specifically for that, but I think it would be easier for me to just use the BQ code as I’m just starting to come to grips with the software). There are three things that I’m concerned about: the NBER classification of peaks and troughs, the dummy variables, again, specific to the US, and how to obtain figures from two graphs.
How shall I extract the means without regressing the series against two dummies, i.e.:
set dummy1 = t<=1973:4
set dummy2 = t>1973:4
linreg dlogrgnp
# dummy1 dummy2
set gdpadjust = %resids
prj means_from_gnp
diff(center) dlogrgnp / gdpadjust
would pull a single mean out of the data.
FRegensburg wrote:I thought the following lines referred to the US business cycle, obviously I’m missing something here, because if I remove them, I somehow get rid of the graph to which they apply as well.
@NBERCycles(peaks=peaks,trough=troughs)
*
* This gets the scale correct for the spikes showing the peaks and troughs
*
set peaks = .10*peaks
set troughs = -.10*troughs
graph(footer="Figure 8. Output Fluctuations Due to Demand",$
ovcount=2,overlay=spike,ovsame) 3
# histdecomp(3,1)
# peaks 1950:2 * 2
# troughs 1950:2 * 2
what shall I add to the following lines to extract the output gap numbers?
graph(footer="Figure 8. Output Fluctuations Due to Demand",$
ovcount=2,overlay=spike,ovsame) 3
# histdecomp(3,1)
# peaks 1950:2 * 2
# troughs 1950:2 * 2
…as well as to these lines to get the figures for trend GDP?
set lessdemand = histdecomp(1,1)+histdecomp(2,1)
graph(footer="Figure 7. Output Fluctuations Absent Demand")
# less demand
Many thanks in advance!
If you want to get rid of the peaks and troughs part, just do:
graph(footer="Figure 8. Output Fluctuations Due to Demand") 1
# histdecomp(3,1)
This is correct if you get rid of the extra space in "less demand" on the # line.
set lessdemand = histdecomp(1,1)+histdecomp(2,1)
graph(footer="Figure 7. Output Fluctuations Absent Demand")
# less demand