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" <nwinter@policystudies.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: standardizing on [0,1]
Date   Fri, 19 Jul 2002 13:01:13 -0400

-----Original Message-----
From: Chevalier,A [mailto:owner-statalist@hsphsun2.harvard.edu] On
Behalf Of Chevalier,A
Sent: Friday, July 19, 2002 12:58 PM
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index