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: partial label list
From
"Benhoen2" <[email protected]>
To
<[email protected]>
Subject
st: partial label list
Date
Wed, 29 Sep 2010 10:44:13 -0400
Stata-sticions,
I have a string variable ("namestr") that was used to create a integer
variable ("name"). My dataset has 5000 cases each with a "name" identified.
The variable "name" has 1,200 unique values and accompanying labels. I
created a new variable which stored the rowwise count of each of the names
across the dataset ("cname").
Code:
encode namestr, gen(name)
bys name: egen cname = count(name)
label variable cname "count of cases per name"
For purposes of display I want to list the name, label, and count for only a
subset of the list of names (e.g., if cname>5). I tried playing around with
"label list" and "tab1" but couldn't find the perfect combo to show me
everything I wanted. Any advice?
Thanks, as always,
Ben
*
* 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/