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: Display one observation
From
Skipper Seabold <[email protected]>
To
[email protected]
Subject
st: Display one observation
Date
Wed, 15 Sep 2010 13:52:57 -0400
All,
Say I have a list of sum values by year. Something like
year cusum
2000 2
2000 4
2000 6
2000 8
2000 .
2000 .
2001 5
2001 .
2001 6
2001 12
How can I loop through and display only the last cusum by year? This
seems like a common operation. Working from how I would do this in
most other languages, I tried to write a loop to place the non-missing
values into a vector by year and then access the vector at the point
of its last observation, but no go. Any ideas?
Thanks,
Skipper
*
* 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/