Sascha O. Becker wrote:
> another labeling question:
> -collapse- automatically changes variable labels of collapsed variables
> to "report" what has been done in the -collapse-.
> While this is probably a good default option to keep you from messing
> things up and "warning" you that the collapsed data set is different
> from the original one, it might be useful in some other cases to keep
> the original variable label.
> As I understand it, there is no option to do this and one has to
> "manually" relabel the collapsed variable if one wants to "keep" the
> original variable label, right?
Yes, but something like
. foreach var of varlist v* {
local lab`var': label var `var'
.}
. collapse (mean) v*, by(varname)
.foreach var of varlist v* {
. lab var `var' "`lab`var''"
.}
should work (not tested)
uli
--
[email protected]
+49 (030) 25491-361
*
* 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/