Buzz later found another solution;
nevertheless, a direct solution may be of interest.
As I understand it, Buzz has something like this
id
time
event1
event2
event3
and for each panel -event1-, -event2-,
-event3- contain the times of events 1 to 3
if and only if those events occur
and (presumably) there is at least one
other response variable.
I'd try something like this:
levels id, local(levels)
foreach l of local levels {
// next line clears macro
local events
forval i = 1/3 {
su event`i' if id == `l', meanonly
if r(max) < . local events "`events'`r(max)' "
}
if "`events'" != "" {
xtline response if id == `l', ///
subtitle(panel `l') xline(`events')
}
else xtline response if id == `l', subtitle(panel `l')
more
}
Nick
[email protected]
*
* 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/