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

st: RE: RE: series of value labels and collapse


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: series of value labels and collapse
Date   Mon, 7 Jul 2003 17:29:50 +0100

akonseig@uni-bonn.de

> I would still like to know if there is any easy way for 
> labeling the values 
> of my dummies using the following in my program.
> 
> local cropnames "beans	cassava maize rice...."
> 
> local codes "beans cassava maize rice ........."
> 
> local i = 1
> foreach x of local cropnames {
>         local y : word `i' of `codes'
>         lab define `x' 1 "`y'" 0 "no"
> 	  capture forvalues j=1/46{
> 	  label val `var'_d`j' `x'
> }
> 	  local i = `i' + 1

I answered this question. Please see previous posting. 

Nick 
n.j.cox@durham.ac.uk 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index