Statalist


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

Re: st: RE: Labelling stacked histograms


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Labelling stacked histograms
Date   Sat, 8 Nov 2008 09:37:56 +0000 (GMT)

--- fran brittan <franbrittan@googlemail.com> wrote:
> Var2 is numerical data, not string. I attached labels to the values
> using this command:
> 
> label def var2 1 "value1" etc.
> 
> If I type "label list", it lists the values as I defined them.
> If I just tabulate it, it shows the numerical values. I don't want to
> change the variable to string.

What you need to type next is:

label value var2 var2

-label define- just defines the label but does not attach it to a
variable. This can be useful when you have many question with the same
value labels (e.g. 1 "strongly agree", 2 "agree", 3 "neutral", etc). In
that case you have to define the labels only once, and you can apply it
to a whole set of variables. 

-- Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index