Statalist The Stata Listserver

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

st: RE: z scores

From   "Masahiko Aida" <>
To   <>
Subject   st: RE: z scores
Date   Thu, 3 May 2007 18:12:08 -0400

You can simply program

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

-----Original Message-----
[] On Behalf Of Donald Braman
Sent: Thursday, May 03, 2007 7:44 AM
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.)
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index