Hello,
I am trying to truncate times to only the hour using floor so that I can merge all data for that hour. However, using the code below, the times are off by seconds/minutes
gen mergehour= floor(time/3600000)*3600000
format mergehour %tc
time mergehour
04may2015 08:10:00 04may2015 08:00:10
15may2019 13:59:00 15may2019 12:59:27
I can't figure out why this would happen, any suggestions?
Thanks
Related Posts with Binning times in hours, rounding error?
Sample size & power for quantile regressionHello, For a clinical trial using quantile regression to test the null hypothesis, could anyone adv…
DID (Differences-in-difference) regressionDear All, I’m having a problem with DID regression equation. I am using Stata 12. when I ran the re…
Correlation PbHello, I am pretty new to Stata and econometrics in general so please excuse me if my question seem…
Three-level mix-effect model for ordered logistic regression in Stata- meologit regressionDear all, I am currently working with a cluster data collected from 3229 respondents in 40 counties…
Composite IndexHi! I am trying to generate a composite index for 2 numerical variables. what is the best way to do …
Subscribe to:
Post Comments (Atom)
0 Response to Binning times in hours, rounding error?
Post a Comment