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" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: series of value labels and collapse
Date   Mon, 7 Jul 2003 17:29:50 +0100

[email protected]

> 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 
[email protected] 
*
*   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