Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Ordering variable values


From   "Anirudh V. S. Ruhil" <[email protected]>
To   [email protected]
Subject   st: Ordering variable values
Date   Tue, 09 Jan 2007 21:10:20 -0500

I have a large panel structured as follows:

------------------------------------------
City State Year Candidate1 Candidate2 Candidate3
A TX 2001 Tom Dick Harry
A TX 2005 Dick Tom Harry
.
.
.
-----------------------------------------------------

and need to generate a counter that reflects the number of unique candidates observed across all election-years in each city. Some thoughts that have occurred include creating a unique ID for each city+state+candidate-name combination, and then running a count. However, I wonder if there is a more efficient solution, and if so, what that might be.

best

Ani

Anirudh V. S. Ruhil, Ph.D.
Sr. Research Associate
Voinovich Center for Leadership and Public Affairs
Ohio University
Building 21, The Ridges
Athens, OH 45701-2979
Tel: 740.597.1949 | Fax: 740.597.3057
*
* 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