| Date: | Tue, 9 Mar 1999 17:19:17 +0100 |
| Reply-To: | Bas Pruijn <b.c.pruijn@PTT-POST.NL> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Bas Pruijn <b.c.pruijn@PTT-POST.NL> |
| Subject: | Re: carrying data forward |
|
| Content-Type: | text/plain; charset="iso-8859-1" |
data outfil;
set infil;
retain var1 var2 var3;
run;
-----Original Message-----
From: jerry mcgwin, jr. <mcgwin@EYES.UAB.EDU>
To: SAS-L@AKH-WIEN.AC.AT <SAS-L@AKH-WIEN.AC.AT>
Date: Tuesday, March 09, 1999 16:39
Subject: carrying data forward
>i am faced with the following data:
>
>ID VISIT VAR1 VAR2 VAR3...
>01 1 0 3 0
>01 2 1 0 0
>01 3 0 0 1
>...
>
>what i need to do is carry forward data from one visit to the next for each
>subject (for each subject there will be anywhere from 1 to N visits). for
>example, given the above data, i need to end up with the following:
>
>ID VISIT VAR1 VAR2 VAR3...
>01 1 0 3 0
>01 2 1 3 0
>01 3 1 3 1
>...
>
>any advice as to how i might accomplish this would be appreciated. tia.
>
>regards.
>
>gerald mcgwin, jr., ms., phd.
>
>department of epidemiology, school of public health
>department of surgery, school of medicine
>university of alabama at birmingham
>
>700 south 18th st., EFH Suite 609
>birmingham, al 35233
>205.325.8631 (ph.)
>205.325.8692 (fax)
>mcgwin@eyes.uab.edu
>http://www.eyes.uab.edu/staff/jerry/mcgwin.html
|