I want to create a continuous day variable from January 1, 1991, to June 12, 1991. For instance, I expect February 1 to be day 32 (after January 31 which should be day 31) and February 3 to be day 34. My data variable is like this:
Date
Jan 01, 1991
Feb 19, 1991
Jan 03, 1991
Feb 22, 1991
Jan 02, 1991
Feb 26, 1991
Jan 02, 1991
Mar 01, 1991
I tried gen day1=day(Date) but it did not work. The day number starts over from the first day of each month. Any help would be appreciated.
Related Posts with Creating a day variable
Is it possible to make the computer game "pong" in stata?I'm trying to make a (simplified) version of the 1972 arcade game "Pong" in Stata but I've run into …
Forvalues questionHello, I just want to check I have got some code right that I had been having some problems with I…
Grouped data to individal patient dataI have some binary grouped data like events1, events2, n1, n2 (see below). But I want to translate i…
Fairlie decomposition for Panel dataI am trying to use fairlie decomposition technique (I am using mvdcmp as it produces same results as…
30 day windows using columnsHi , I dont think -rangestat-will work for this issue using the -datex- output provided below I wou…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a day variable
Post a Comment