Date: Mon, 18 Feb 2008 12:14:58 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Survival Analysis-Stratification
Phil,
I'm not sure what you're asking. If it is how to restructure the file,
then you will have to indicate why some cells get 1s and some 2s, as well
as why the ranges don't match (like in the 2 to 9 scenario).
Regardless, hopefully the following comes close:
data have;
input Strata $ LL UL;
cards;
A 5 10
A 1 4
A 2 9
B 1 5
B 5 8
;
data want (drop=LL UL);
array t(10);
set have;
do i=LL to UL;
t(i)=1;
end;
run;
Art
--------
On Mon, 18 Feb 2008 11:26:56 -0500, Phil Jackson
<arlando20002000@YAHOO.COM> wrote:
>This is how the data looks.
>
>
>Data Set:
>
>Strata LL UL
>A 5 10
>A 1 4
>A 2 9
>B 1 5
>B 5 8
>
>What I want:
>
>Strata t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
> A 1 1 1 1 1 1
> A 1 1 1 1
> A 2 2 2 2 2 2 2 2 2
> B 1 1 1 1 1
> B 2 1 1 1
>
>
>Then use last.strata to use only the last row as an accumulated total by
>strata - which is the at risk total at a given tenure.
>
>Phil