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
Instrumental Variable with binary endogenous variable and interactions and fixed effects - please help!Hello everybody, I please need your help, since I don't know how to proceed with my research. I'm…
Replacing valuesHi all, I have a dataset containing values ranging from 1 to 3. I'd like to replace all the 1 to 3,…
Help with Logit in panel data and measuring a time invariant independent variable.HI statalist, I'm trying to run a panel data regression where the dependent variable is a binary va…
Testing if coefficients are statistically different from each otherHi, I have run the two regressions below. The method variables are different for Dry Recycling and C…
Plotting variable around certain thresholdHi Statalist members, I am working with survey balanced panel data covering 32 waves. I am analyzin…
Subscribe to:
Post Comments (Atom)
0 Response to date and time
Post a Comment