Dear Statalisters,
I believe my question is very simple, yet I can't seem to find an answer. Please have a look at my data:
event is a binary variable that takes 1 if something happened during the date showed by d_date (a daily one). However, I do not need to be that precise and I would like to generate a new event variable in a way that the new variable takes value 1 if something happened during the monthly date (m_date). This will be useful for merging and regressing.
I read the dates manual by using the help command but it does not seem I can change the timespan of a particular binary variable using a specific command. Does any of you have a solution?
Thank you for your time.
Julia
I believe my question is very simple, yet I can't seem to find an answer. Please have a look at my data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double event float(d_date m_date) 0 21915 720 0 21916 720 0 21917 720 0 21918 720 0 21919 720 0 21920 720 0 21921 720 0 21922 720 0 21923 720 0 21924 720 0 21925 720 0 21926 720 0 21927 720 0 21928 720 0 21929 720 0 21930 720 0 21931 720 0 21932 720 0 21933 720 0 21934 720 end format %td d_date format %tm m_date
I read the dates manual by using the help command but it does not seem I can change the timespan of a particular binary variable using a specific command. Does any of you have a solution?
Thank you for your time.
Julia

Comment