Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: viewing variable labels


From   Sarah Mustillo <[email protected]>
To   [email protected]
Subject   Re: st: viewing variable labels
Date   Sat, 17 Jul 2004 09:59:22 -0400

Stas -

I can't believe I missed that! Can I blame it on an end-of-the-day-Friday kind of thing?

I swear I checked -help list-, but I didn't see that option - thanks so much for pointing it out. I appreciate the help.

Sarah

Stas Kolenikov wrote:


once again with a proper subject line :)


This sounds easy enough, but I cannot figure out a way to do this!  I
thought there might be an option with browse, list, outsheet, etc. to
display the labels, but I can't find one.  I've done a net search for
user-written ados, with no luck there either.

Reading through the -help list- reveals -subvar- option that can do this
for you:

. sysuse auto

. foreach x of varlist * {
  2. local label : var lab `x'
  3. char `x'[varname] `label'
  4. }

. li make mpg trunk in 1/5, subvar nocomp

     +------------------------------------------+
     | Make and Model       Mileage    Trunk sp |
     |------------------------------------------|
  1. | AMC Concord                22         11 |
  2. | AMC Pacer                  17         11 |
  3. | AMC Spirit                 22         12 |
  4. | Buick Century              20         16 |
  5. | Buick Electra              15         20 |
     +------------------------------------------+

 ---                                    Stas Kolenikov
 --       Ph.D. student in Statistics at UNC-Chapel Hill
 - http://www.komkon.org/~tacik/  -- [email protected]

* This e-mail and all attachments to it are not intended to provide any
* reasonable point of view and was transmitted to you in error. It
* should be immediately deleted by all recipients unless they really
* enjoy communicating with the author :). Other restrictions apply.


*
*   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/

--
Sarah A. Mustillo, Ph.D
Department of Psychiatry and Behavioral Sciences
Duke University School of Medicine
Box 3454
Durham NC 27710

919 687-4686 x231
*
*   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