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

st: RE: series of value labels and collapse


From   akonseig@uni-bonn.de
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: series of value labels and collapse
Date   Mon, 07 Jul 2003 18:22:27 +0200 (MES)

Thank you Nick for the nice suggestion, it can be time saving to just share a 
problem with Statalist as combining -sum- with -capture noisily- and -display-
, I got exactly the information I needed.
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
 
Best regards.
Adama

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