原始日期为:date IXICmsClS
1971-02-05 101.34
1971-03-01 105.97
1971-04-01 112.3
1971-05-03 108.25
1971-06-01 107.8
实际上这是个月度数据,因此想把其转为月度的日期序列。我先用gen d=date(date,"YMD")然后format d %td转成了
d
05feb1971
01mar1971
01apr1971
03may1971
01jun1971
01jul1971
02aug1971
01sep1971
但是如果直接将format转成%tm的话会算成
d
2297m10
2299m10
2302m5
2305m1
2307m6
2309m12
2312m8
2315m2
我试着把月和年分别提取出来成month和date 序列如下,但是不知道怎么“拼起来”。
month year
2 1971
3 1971
4 1971
5 1971
6 1971
7 1971
8 1971
9 1971
能否告诉我怎么做?另外论坛里原来有的
“[原创]:有关Stata日期的介绍:写给初学者”http://www.pinggu.org/bbs/viewthread.php?tid=457117&highlight=%2BStata%2B%C8%D5%C6%DA
没办法下载,能否谁帮忙传一份。谢谢。(发现大多数问题是关于日期设定的)