I have a time series dataset with quarterly observations, which I want to collapse
to an annual series. For that, I need to transform my date variable first.
It looks like
. list date in 1/5
+--------+
| date |
|--------|
1. | 1991q1 |
2. | 1991q2 |
3. | 1991q3 |
4. | 1991q4 |
5. | 1992q1 |
+--------+
Hence, to collapse
, I want date
(or date2
) to be 1991, 1991, 1991, 1991, 1992 etc.
Once I have that, I could use collapse
or tscollapse
to turn my dataset into annual data.