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

st: RE: standardizing on [0,1]


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: RE: standardizing on [0,1]
Date   Fri, 19 Jul 2002 13:01:13 -0400

-----Original Message-----
From: Chevalier,A [mailto:[email protected]] On
Behalf Of Chevalier,A
Sent: Friday, July 19, 2002 12:58 PM
To: [email protected]
Subject: RE: standardizing on [0,1]


Thomas,

the following should do the trick,

su var
gen nvar=(var-r(mean))/r(sd)

>>>>>>>>>>
I note that this will generate a standardized variable (mean 0, sd=1),
not a variable rescaled to run from zero to one.

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