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]
st: standardizing scores by cohort
From 
 
Paul Byatta <[email protected]> 
To 
 
[email protected] 
Subject 
 
st: standardizing scores by cohort 
Date 
 
Wed, 24 Apr 2013 14:15:41 +0300 
Hi
I am trying to standardize raw
scores for several cohorts of students based on year of admission to high
school.
My data looks like this
StudentID    Year of                   math
                   Admission (yoa)
1                  2004                     78
2                  2004                     83
3                  2004                     99
4                  2005                      58
5                  2005                     68
6                  2005                     67
7                  2006                     87
8                  2006                     75
9                  2006                    56
It would have been easier to use
egen std_math =3D std(math) by yoa
But then egen doesn=92t go with =93by=94 in this case.
Anybody with a suggestion of how standardize the scores without having to
through the long process that is (below) and combining the generated
variables to get std_math?
egen std_math4 =3D std(math) if yoa=3D=3D2004
egen std_math5 =3D std(math) if yoa=3D=3D2005
egen std_math6 =3D std(math) if yoa=3D=3D2006
Thanks
Paul
*
*   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/