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
removing duplicates based on a criteriaHello, I have a dataset with village names and their respective populations. Villages belong to diff…
2023 Stata Conference Stanford - Call for presentationsOn behalf of the organizing committee (Colin Cameron, Jeremy Freese, Lakshika Tennakoon and myself),…
stpm2cr - Problems plotting CIF difference, cause-specific hazard function and sub distribution hazard functionsHi all, I continue to work with stpm2cr to model cumulative incidence for my study (Mozumder et al,…
creating matrix of coefficient covariance valueshi-- I would like to create matrices of the coefficient covariance matrices generated by the code: …
Bootstrapping using multiple samplesI have two samples from different sources. The primary sample is a panel, but does not contain the i…
Subscribe to:
Post Comments (Atom)
0 Response to date and time
Post a Comment