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/