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?
Examining the Trade Potential of the UAE using a Gravity Model and a PPML EstimatorWe are estimating a PPML model for the UAE using a total of 32 exporting countries and about 200 imp…
z-statistics (instead of t-statistics) reported in generalized method of moments (GMM) estimation?Hi, I was wondering why Stata reports Z-statistics instead of t-statistics when using the command "…
graph bars with erro barshi all, I have 45 continuous variables with 500 observations. i have been reading about creating gra…
Creating a loop that can calculate a mean of 21 variables, while ignoring variables with missing valuesI am trying to create a loop that can calculate a mean score for 21 variables, while ignoring missin…
Marginsplot with no constant - for Treatment Effect only and not Outcome value YHi there, I am running a household fixed effects model on some panel data to estimate the effect of…
Subscribe to:
Post Comments (Atom)
0 Response to Binning times in hours, rounding error?
Post a Comment