From | Matt Dobra <[email protected]> |
To | [email protected] |
Subject | Re: st: Create the count of occurances in a panel |
Date | Fri, 22 Apr 2005 15:59:23 +1000 |
Dear users,
I have a list of person ids as follows.
1. 4001
2. 4001
3. 4001
4. 4002
5. 4002
6. 4003
7. 4003
8. 4003
9. 4003
10. 4004
11. 4004
12. 4004
13. 4008
14. 4172
15. 4172
The number of occurances represents the years they are in a panel
dataset. For example, person 4001 have appeared three years in the
panel, and person 4003 has occured four years in the panel.
I am trying to create a count of years those individuals occur in the
panel, i.e., 3 for person 4001, 4 for person 4003, 3 for person 4004, 1
for person 4008, etc. I have some thoughts to do this by reshaping the
data, but doubt that is the most efficient way to do. Is there any fast
way to do it in STATA?
Thanks,
Ying
*
* 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/
* * 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 |