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

Re: st: easy question:standardizing variables


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   Re: st: easy question:standardizing variables
Date   Sun, 29 Dec 2002 19:54:04 -0600

At 07:48 PM 12/29/2002 -0600, you wrote:
Statlisters,

I know this is a really basic question, but I really can't figure something
out:

I want to standardize the variables in my dataset (there are 36) without
typing "egen zvar1=std(var1)" 36 times.
foreach var of varlist var1 var2 var3 varn {
egen z`var'=std(`var')
}


Fred Wolfe




---------------------------------------------------------------------------- ------------------------
Fred Wolfe Tel (316) 263-2125
National Data Bank for Rheumatic Diseases Fax (316) 263-0761
Wichita, Kansas [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