Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: need reshape help

From   "Averett, Susan L" <>
To   "." <>
Subject   st: need reshape help
Date   Tue, 8 Jun 2010 09:08:44 -0400 (EDT)

I have a data set that I need to reshape. I have two id codes that TOGETHER uniquely identify each individual in my survey.
FAMID is a number and AID is a strong. I have a variable pair, that identifies what type of sibling they are. Respondents can be in more than one pair if three or more siblings from the same family were interviewed.   The data are currently in this form:

FAMID                PAIR                AID
123                TWMM123        10
123                TWMM123        20
123                FSMF001        30
123                FSMF001        10
123                FSMF002        30
123                FSMF002        20

I need the specific pair designations for each respondent, so I need to reshape the to create several PAIR variables so the file looks like this:

FAMID                PAIR1        AID        PAIR2
123                TWMM123        10        FSMF001
123                TWMM123        20        FSMF002
123                FSMF001        30        FSMF002

BUT, I can't figure out how to do it using reshape. Any help would be appreciated.
Susan Averett
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index