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
svy: reg get standardized coefficients for both continuous and categorical predictorsHi Statalist, I came across an issue for getting standardized coefficients for svy: reg, when there…
How to draw cubic splines after Cox regressionHello, Could anybody help me with syntaxis to do this graph? y axis= hazard ratio. x axis= covariate…
separate regression of different groups in the panel dataHi everyone! I seem to stuck in the problem of doing regression of different groups within the panel…
Inconsistency between correlation analysis and regression resultsHi Statalist, I have the panel data (state-year) and run a correlations analysis between my y and x…
Count dependent variable with many zero valuesHi My dependent variable is the number of policies that a company has adopted in the given year. It…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a day variable
Post a Comment