Hi!
i want to make a dummy variable that takes the value 1 if we observe a sale after a certain date for a spesific location
I have the date column on %tc format (e.g. 04jun2018 00:00:00) and i can't figure out how to do this correctly
i do this
generate treatment =0
replace treatment =1 if location=1 & salestime => tc(06.jun2018 00:00)
but then stata replace the dummy treatment to 1 if location is 1 and all the sales on this location, not only the ones after this spesific time.
Does anyone know?
Related Posts with date and time
Quadrature() and numerical integration in MataHi, I am estimating a Poisson log-normal count data model with maximum likelihood and I need to do …
Converting annual to quarterly GDPHello everyone. I am trying to convert annual data to quarterly data. In particular, I have annual G…
2SLS With Interaction TermsHello, Sorry I've seen similar posts like this before however, I have been unable to find an answer …
Consecutive loss years in STATADear all, In my master thesis, I want to examine the relation between CEO turnover and innovation. …
Difference-in-difference fixed effects for discontinued treatmentDear all, I am trying to run a difference-in-difference fixed-effects model to estimate the effect …
Subscribe to:
Post Comments (Atom)
0 Response to date and time
Post a Comment