Dear statlist members,
I am trying to find a solution for the following problem.
I have a dataset organized by personID, for each personID there are
startDate and Duration for various activities.
I want to find out how many activities a person performs at the same
time (e.g. something like workload)
logically i see it like this:
sort personID startDate Duration
by personID: forvalues i=1/`=_N' {
"compare current date with all
other prior dates+duration
and update counter accordingly"
}
however, by and forvalues do not work together, so i am trying to find
an alternative way to do so.
thank you in advance
C.
*
* 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/