Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Time set twice per day


From   Steven Archambault <[email protected]>
To   [email protected]
Subject   st: Time set twice per day
Date   Fri, 11 Jan 2013 14:56:16 -0700

Hi all,

I have panel data where each id is observed twice in a day. I have the date
for which the observation was taken, as well as an elapsed time value
(eltime). If the elapsed time for a day is higher, that is a PM
observation. How do I merge this elapsed time with the date to come up with
one time variable to use in the tsset command?

Here is a sample of the data.

  id date eltime
1 5-Aug-11 0.70833333
1 5-Aug-11 1
1 6-Aug-11 1.7083333
2 6-Aug-11 2
2 7-Aug-11 2.7083333
2 7-Aug-11 3
2 8-Aug-11 3.7083333
2 8-Aug-11 4
3 11-Aug-11 7
3 12-Aug-11 7.7083333
3 12-Aug-11 8
3 13-Aug-11 8.7083333

Your help is much appreciated.

Thanks,
Steve
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index