Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Summarizing data by Timestamps


From   Diego Bellavia <[email protected]>
To   STATAlist <[email protected]>
Subject   st: Summarizing data by Timestamps
Date   Mon, 7 Dec 2009 18:51:34 +0000 (GMT)

Hello StataListers, 
 
I have such a dataset: 
 
Timestamp           Pressure 
11/22/09 00:00        120
11/22/09 00:01        123
11/22/09 00:02        119
11/22/09 00:03        115
11/22/09 00:09        123
11/22/09 00:10        122
11/22/09 00:22        112
 
etc...
 
As you see, Pressure values are reported by time (defined as a timestamp) every minute.
Unfortunately, the system is not so precise to collect pressure every single minute so, 
I do not necessarily have 60 measures in 1 hour. 
Now I would like to compute averages for Pressure every pre-spcified time range, starting, as exmaple, 
with ana average of all the values collected between 00:00 and 01:00 on 11/22/2009 but also being able to 
change the time range from 1 hour, to 4 or 6 hours and so on. 
 
How can I do that in STATA, considering that I do not know how many measure are collected per hour ? 
 
Thank you in advance, 
 
Diego



      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index