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/