Dear Stata community,
I have a variable stored as dates in the Stata format i.e 01jul1993 (I converted them from string into the correct format). However
I know want to create a new variable which organises the observations according to whether the date was pre or post 31dec1996. what would be the best command to use please? I have tried reading the manual in reference to dates/ times but I could find anything that helps with generating new variable according to the date.
Many thanks for your help,
Roshani
Related Posts with generating new variable based on date variable
Stata 17 ptrendsHi, I'm a student working on a diff in diff using Stata 17's new didregress. I used the postestimati…
How to copy the output table in Stata to excel with the cell-by-cell format?When running this code, Code: esttab m1 m2 m3 m4 m5 m6,star(* 0.1 ** 0.05 *** 0.01) ar2 title(" de…
replicating an instrumented model in eregress and ivreg2 (or ivregress)Hi Stata people, I would like to replicate a model I am using in eregress (Stata 15 and up) and ivr…
How to create a two-axis graph by using coefficient plotting?When I run this regression for coefficient plotting purposes Code: reghdfe wNET_PRO_MAR dkt_4 dkt_…
Outfile to raw without aproximating values of dataHi, how can I export data into a raw file preserving the original values of large numbers? I am usi…
Subscribe to:
Post Comments (Atom)
0 Response to generating new variable based on date variable
Post a Comment