[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Combining two data files and follow-up data in
Type -help reshape- to find out about the -reshape- command.
At the moment you probably have a variable called something like 'month' and
another one called something like 'alive'.
After you -reshape wide- you will have several variables with names like
'alive6', 'alive12' and so on.
You may need to use the -string- option if you have text (like Y and N)
instead of numbers in your 'alive' variable.
Be prepared to experiment a bit if you are new to -reshape-. The examples in
the help file will point you in the right direction.
Date: Fri, 30 Jun 2006 12:19:51 -0700 (PDT)
From: Ashwin Ananthakrishnan <email@example.com>
Subject: Re: st: RE: Combining two data files and follow-up data in Stata
Thanks for getting back to me. I apologize if I'm
asking an obvious question but how do I reshape the
file from long to wide? Would you be able to explain
my main file has
My follow up file has
Case1 - 6 months - alive (Y)
Case1 - 12 months - alive (Y)
Case1 - 18 months - alive (N)
How do I reshape the follow up file so that it reads
6 months 12 months 18months
Case 1 y y n
- --- Richard Atkins <Richard.Atkins@lshtm.ac.uk> wrote:
You will have to reshape your followup file from
long to wide (so each
case is a main_ID and has variables x_1, x_2 etc
repeated measurements. They use the merge command.
London School of Hygiene and Tropical Medicine
* For searches and help try: