Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
For a solution with the same dataset:
egen tag = tag(State County)
egen freq = total(tag), by(State)
egen tag2 = tag(State)
l State freq if tag2
See also for a discussion of principles
SJ-8-4 dm0042 . . . . . . . . . . . . Speaking Stata: Distinct
(help distinct if installed) . . . . . . N. J. Cox and G. M.
Q4/08 SJ 8(4):557--568
shows how to answer questions about distinct observations
from first principles; provides a convenience command
Principal Research Associate
Lawrence Berkeley National Laboratory
* For searches and help try: