Statalist


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

st: what does -egen std- do?


From   Caleb Southworth <[email protected]>
To   [email protected]
Subject   st: what does -egen std- do?
Date   Wed, 1 Apr 2009 13:05:30 -0700 (PDT)

How is the variable generated by -egen std- standardized?

Here I take a variable, subtract the mean and divided by sd

gen std_man=(P_math-45.20336)/13.3137

Here's the egen version

egen std_egn=std(P_math)

. sum std*

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     std_man |       775    2.58e-07    .9999999  -3.019699    3.06426
     std_egn |       775   -1.24e-09           1  -3.019699    3.06426

What explains the difference in means?

Caleb Southworth
Associate Professor
Univ. of Oregon Sociology
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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