Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: partial label list

From   "Benhoen2" <>
To   <>
Subject   st: partial label list
Date   Wed, 29 Sep 2010 10:44:13 -0400


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").

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,


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index