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

RE: st: more informative names of dummy vars


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: more informative names of dummy vars
Date   Tue, 10 Dec 2002 13:07:17 -0000

Roger Newson on using -rename- under the aegis of -for-: 
> 
> One simple possibility is to use the -rename- command; see 
> the manual under -[R] rename-. Annelies might type
> 
> for X in numlist 1(1)10) \ Y in any morocco somalia britain 
> holland usa 
> belgium china ecuador venezuela uzbekistan:rename 
> _Iorigin_X  _Iori_Y
> 
> This uses the -for- command to do a lot of repeats; see 
> -help for- or the 
> manuals under -[R] for-.

It may be of interest to compare this with the -renvars- 
syntax recommended in my earlier posting. 

renvars _Iorigin_* \ morocco somalia britain holland usa 
belgium china ecuador venezuela uzbekistan

renvars morocco-uzbek, pref(_I_ori_) 

Swings and roundabouts, as we say hereabouts. 

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