Statalist The Stata Listserver


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

st: Re: RE: Standardizing a variable and adjusting for subgroups


From   "Christer Thrane" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: Standardizing a variable and adjusting for subgroups
Date   Tue, 17 Jan 2006 21:40:29 +0100

Thanks, Nick!

Christer
----- Original Message ----- From: "Nick Cox" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 17, 2006 8:01 PM
Subject: st: RE: Standardizing a variable and adjusting for subgroups



I don't think there is any need for file ballet.
Sounds like
egen mean = mean(zgrade), by(school) egen sd = sd(zgrade), by(school)
gen zgrade2 = (zgrade - mean) / sd
Nick [email protected]
Christer Thrane


I have a standardized variable, zgrade, wich denotes the grade point average for a sample of college graduates. Just recently I found out that this variable's overall mean value (i.e. zero) varies between the five diiferent schools that the graduates attended. Is it possible to make a new standardized variable that also "adjusts" for these school differences without diasaggregating the file into five sub-files (i.e. five schools) and appending them afterwards?
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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