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
invalid 'h' r(198) error in foreach loopDear statalists, I am currently working to extract specific variables from the British Househould P…
Cannot get mm_root to solve an equation for which excel shows there is an answerDear Statalist, I have been trying to solve for r in the function described below. I cannot figure …
t-tests under heteroskedasticityHi everyone, I am trying to analyse how the variable "score" varies over time. I have used the follo…
How to use putexcel after testparmHi all, I am trying to use the put excel function after testparm, but not sure how to go about it. …
How to repeat specific observations in panel dataHello everybody I hope you are doing well. I want to repeat observations for one group into other g…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a day variable
Post a Comment