|
Jian:
Is this outsourcing to SAS-L? If so, you'll have to complete and submit our
new 28 page System Modification and Validation Request Form and submit it to
the list for approval.
Sig
-----Original Message-----
From: Jian Mao [mailto:maojianj@HOTMAIL.COM]
Sent: Tuesday, June 01, 2004 12:13 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: program modification
Hi,
For the following program sent to me a while ago, I just want to add one
thing,
old rule:
/* 2. After the 1st of occurrence of "1" (remission=yes),
follow up for 2 more periods. If the value at 2nd
follow-up period=0, relapse=yes; otherwise,
relapse=no. */
new rule:
/* 2. After the 1st of occurrence of "1" (remission=yes),
follow up for 2 more periods. If the value at THE FIRST
PERIOD, or 2nd
follow-up period=0, relapse=yes; otherwise,
relapse=no. */
thank you so very much for your help!
----Jian------
Data InData(drop=_:) ;
InFile cards truncOver ;
Input id $2. t0 t1 t2 t3 t4 t5 t6 (remis relap)($) ;
Length
Remission $3
Relapse $3
;
Array a [0:6] t0-t6 ;
_remissionFlag = 0 ;
Remission = "no" ;
Do _i=lBound(a) to hBound(a)-2 ;
If a[_i] then do ;
_remissionFlag = 1 ;
/* 1. Remission=yes if there is any occurrence of 1 during
time periods t0 up to t4 (or remission=yes if t0 or t1
or t2 or t3 or t4=1). */
Remission = "yes" ;
Select (a[_i+2]) ;
/* 2. After the 1st of occurrence of "1" (remission=yes),
follow up for 2 more periods. If the value at 2nd
follow-up period=0, relapse=yes; otherwise,
relapse=no. */
When (0) Relapse = "yes" ;
When (1) Relapse = "no" ;
/* 3. If 2nd follow-up=missing, define relapse status
based on 1st follow-up period (e.g., id 12). */
Otherwise select (a[_i+1]) ;
When (0) Relapse = "yes" ;
When (1) Relapse = "no" ;
/* 4. If both follow-up=missing after remission (1st
occurrence of 1), recode both remission and
relapse = missing (e.g., id 11 & 13). */
Otherwise do ;
Remission = " " ;
Relapse = " " ;
End ;
End ;
End ;
Leave ;
End ;
End ;
/* 5. If "1" (remission) never occurred (e.g., id 4) or occurred at
t5 or t6, both remission and relapse should be set as missing
too. */
If not _remissionFlag then do ;
Remission = " " ;
Relapse = " " ;
End ;
Cards4 ;
01 0 0 0 1 0 0 0 y y
02 0 0 0 0 1 1 1 y n
03 0 0 0 0 1 0 0 y y
04 0 0 0 0 0 0 0 . .
05 0 0 0 0 0 1 0 . .
06 0 0 0 0 0 0 1 . .
07 1 0 0 0 0 0 0 y y
08 1 1 1 1 1 1 . y n
09 0 1 . 1 1 1 1 y n
10 1 . 0 . 0 1 1 y y
11 0 1 . . 1 . . . .
12 0 1 1 . 1 . . y n
13 0 1 0 . 1 . . y y
14 0 1 . . 1 0 0 . .
;;;;
run;
proc print data=InData;
run;
*****----------------------------------------------------------------*;
data three;
input id t0 t1 t2 t3 t4 t5 t6 oldRemis $ oldRelaps $;
cards;
01 0 0 0 1 0 0 0 y y
02 0 0 0 0 1 1 1 y n
03 0 0 0 0 1 0 0 y y
04 0 0 0 0 0 0 0 . .
05 0 0 0 0 0 1 0 . .
06 0 0 0 0 0 0 1 . .
07 1 0 0 0 0 0 0 y y
08 1 1 1 1 1 1 . y n
09 0 1 . 1 1 1 1 y n
10 1 . 0 . 0 1 1 y y
11 0 1 . . 1 . . . .
12 0 1 1 . 1 . . y n
13 0 1 0 . 1 . . y y
14 0 1 . . 1 0 0 . .
;
run;
_________________________________________________________________
Learn to simplify your finances and your life in Streamline Your Life from
MSN Money. http://special.msn.com/money/0405streamline.armx
|