Hello,
I have Data like this
input double id str6 V1 long V2 long V3
1 "A" 20180103 20180830
2 "B" 20160409 20161218
end
where V2(aaaammdd) is the starting date and V3(aaaammdd) is the end date.
Using these two variables I want to construct a data like this
input double id str6 V1 long V2 long V3 long V4
1 "A" 20180103 20180830 201801
1 "A" 20180103 20180830 201802
1 "A" 20180103 20180830 201803
1 "A" 20180103 20180830 201804
1 "A" 20180103 20180830 201805
1 "A" 20180103 20180830 201806
1 "A" 20180103 20180830 201807
1 "A" 20180103 20180830 201808
2 "B" 20160409 20161218 201604
2 "B" 20160409 20161218 201605
2 "B" 20160409 20161218 201606
2 "B" 20160409 20161218 201607
2 "B" 20160409 20161218 201608
2 "B" 20160409 20161218 201609
2 "B" 20160409 20161218 201610
2 "B" 20160409 20161218 201611
2 "B" 20160409 20161218 201612
end
where V4(aaaamm) is extract from V2 and V3.
Thank you for your patience and I am looking forward to your feedback.
Related Posts with Data management
Avergaing values of variables to reduce survey observationsHi, I am looking for a solution to average the survey respones. Below S007 is suvey respondent ID, …
Stata for loop errorHi, I am trying to run the below loop in stata. But i get an error. Can someone help me. I am a be…
Dealing with missing data after using business date for daily stock returnDear distinguished Prof, I have daily data on stock price of 15 companies, I want to calculate daily…
Something wrong with -colorpalette-Dear Stata users, I have installed the -colorpalette- wrote by Ben Jann, and I remenber that it run…
Interpreting significant interaction effect while main effect is insignificantHi! I am investigating the effect of balanced ambidexterity and combined ambidexterity on firm perf…
Subscribe to:
Post Comments (Atom)
0 Response to Data management
Post a Comment