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   Red Owl <[email protected]>
To   <[email protected]>
Subject   re: st: loop for z-score
Date   Sat, 28 Dec 2013 13:32:20 -0500

In addition to Nick Cox's suggestion to use -egen-'s -mean()- and -sd()-
functions, you could consider the -center- ado program by Ben Jann.

*** BEGIN CODE ***
net describe center, from(http://fmwww.bc.edu/RePEc/bocode/c)
*** END CODE ***

Red Owl
[email protected]


> Almazea Fatima <[email protected]> wrote:
>
> 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???????
>
> Thank you in anticipation.
>
> Regards
> Almazea
*
*   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