Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Indicator Variable HELP!


From   "kelly johnson" <[email protected]>
To   [email protected]
Subject   st: Indicator Variable HELP!
Date   Wed, 14 Sep 2005 15:50:42 -0400

Hi,

I have a variable, date (in %d format). There are numerous observations with the same date, although the number of observations with the same date is not constant. (also, there are gaps in the days). I want to create an indicator variable to group date in increments of 10 days. (for the first 10 days, i want the variable to be 1, the next 10 days, the observation to be 2 and so forth. Any help would be appreciated (if tried the -egen- seq commands, but haven't been able to get it to condition on date. Thank you!

Kelly


Date Indicator
02Jan2005 1
03Jan2005 1
04Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
05Jan2005 1
06Jan2005 1
09Jan2005 1
09Jan2005 1
09Jan2005 1
09Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
10Jan2005 1
11Jan2005 1
11Jan2005 1
11Jan2005 1
11Jan2005 1
11Jan2005 1
11Jan2005 1
12Jan2005 1
13Jan2005 1
13Jan2005 1
13Jan2005 1
14Jan2005 1
15Jan2005 2
16Jan2005 2

_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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