I have data collected in 15sec intervals over the course of 7 consecutive days.
Each row represents a single 15sec interval (fraction of 24hr day)
with a corresponding count variable ranging from 0 to 100.
For example, below represents a time-span of 3 minutes, beginning at
Midnight (zero - 00:00:00) to 00:03:00 (0.002083)
time count
0 0
0.000174 0
0.000347 12
0.000521 58
0.000694 0
0.000868 32
0.001042 0
0.001215 0
0.001389 4
0.001563 27
0.001736 42
0.00191 8
0.002083 0
Can someone assist me in recoding the count variable to identify 20min
or longer time segments (80 15sec intervals/rows) that have
consecutive "zero" counts.
In the data there could be two 20min zero-count time segments, three
35min zero-count time segments, and one 4 hour zero-count time
segment.
These non-count segments could have occurred anytime throughout the
day. Hence, simply coding by counting every 20 rows does not work.
Any suggestions would be appreciated.
Michael
*
* 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/