Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: z scores


From   "Bruce Kennedy" <Bruce.Kennedy@bc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: z scores
Date   Thu, 3 May 2007 19:52:36 -0400

Or you can simply use the center ADO:

ssc install center

center var1----varn, prefix(_z) standardize


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Masahiko Aida
Sent: Thursday, May 03, 2007 6:12 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: z scores

You can simply program


foreach var of varlist var*{
quietly: su `var' , de
replace `var' = (`var' - `r(mean)') / `r(sd)'
}



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Donald Braman
Sent: Thursday, May 03, 2007 7:44 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: z scores

I need to calculate z-scores for a large number of variables. Does
anyone have a macro/script for z-score calculations of this sort, or
know of an ADO that can do it?  (I'm relatively new to STATA & miss
the ease of the z-score function as part of descriptives in SPSS.)
-Don
*
*   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/



*
*   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/


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