Statalist


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

st: Reshaping Data File


From   "Meryle Weinstein" <[email protected]>
To   <[email protected]>
Subject   st: Reshaping Data File
Date   Wed, 15 Jul 2009 10:41:22 -0400

I have a dataset that contains 4 records per student representing scores on
tests taken in each year.  Each student may or may not have taken the exam
in a particular year, or may have taken the same test in multiple years.  I
want to create a dataset that has one record for each student that has each
of the tests taken, regardless of year and if taken multiple times the last
test results.

Here's what the file looks like

Id    Year      MathDate     MathScore        EngDate    EngScore
1	2002                                    6/21/02        85
1     2003      06/20/03	  55
1     2004
1     2005                                    
2	2002
2     2003      06/20/03	  40
2     2004      05/31/04        55
2     2005                                   6/15/05         65

I thought I could do a reshape wide but there are lots of cells with no
data, plus some cells with multiple data for the same student.

Any help is appreciated.


Meryle Weinstein, Ph.D.
Assistant Director
Institute for Education & Social Policy
New York University
82 Washington Square East, 7th floor
New York, NY 10003
(212) 998-5817
(212) 995-4564 (fax)
www.steinhardt.nyu.edu/iesp



*
*   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