Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • reshaping in stata

    I have some data in which I have for each row the data by center, and I need to have them by student.

    In a simplified way, my variables are:


    center numstudents teacher [...] gr1nia1 gr1nia2 [...] gr2nia1 gr2nia2 [...]


    where the variables that starts with gr are those corresponding to the students.

    i am new to Stata, so i'm not really sure how to do it, any idea of how can i do it?

  • #2
    See -help reshape- if you have not checked it out already. Also, in the future, you'll want to use the -dataex- command to show some example data, as described in the StataList FAQ.

    Code:
    rename gr*nia* grnia* // Rename student variables to create workable variable "stub"
    reshape long grnia, i(center) j(student)
    drop if missing(grnia)

    Comment

    Working...
    X