Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: loop for z-score


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: loop for z-score
Date   Sat, 28 Dec 2013 18:16:04 +0000

<>

-egen-'s -mean()- and -sd()- functions support operations -by:-, so
your own standardization should be easy using those for the basic
calculations. I can't see that a loop is needed.

On the other hand, I don't know what you mean by "z score 3".

Nick
njcoxstata@gmail.com


On 28 December 2013 17:15, Almazea Fatima <almazea.fatima@sydney.edu.au>

> I have a variable "quantity", I want to standardize(z score 3) it by "region" and "season"
> I used following for this purpose:
> egen z=std(quantity)
> Problem is it do not have "by" option, so I want to do it by loop..
> Can anybody help me to create loop for it???????
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index