Dear All,
Suppose that I have time series from 1857m1 to 2017m12 as follows.
I'd like to replace recession with 1 as long as the months belong to recession defined by NBER, i.e., between nber1 and nber2 below.
Any suggestions?
Suppose that I have time series from 1857m1 to 2017m12 as follows.
Code:
clear set obs 1932 gen t = m(1857m1)+_n-1 format t %tm gen recession = 0
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(nber1 nber2) -1231 -1213 -1191 -1183 -1137 -1105 -1087 -1069 -1035 -970 -934 -896 -874 -861 -834 -824 -804 -787 -769 -751 -727 -709 -688 -665 -632 -619 -600 -576 -564 -541 -497 -490 -480 -462 -440 -426 -399 -386 -366 -322 -272 -259 -179 -171 -134 -123 -78 -68 -29 -21 3 13 119 130 166 182 240 246 258 274 366 374 494 502 575 593 end format %tm nber1 format %tm nber2
Comment