Print

Print



I'm trying to write a SAS program to carry out Log Rank analysis. I have
obtained a sample set of data from Doug Altman's book on Medical Stats (pg.
380) and am working through it. I have done the example by hand and obtain
the answer in the book. However I have tried the same example using SAS and
don't. I suspect that this is because I have not told SAS how to deal with
the two types of censored data correctly. One type of censored data
occurring during the experiment (which was scheduled to last 120 minutes).
The other type occurring when items are "still alive " at the end of 120
minutes(right censored data). Does anyone know how to tell SAS how to deal
with the two types of censoring mentioned. I have included the code I have
got so far in case there are any SAS gurus out there who can assist.

There were 28 subjects in group 1 and 21 in group 2. In group 1 there was
one piece of censored data at 6 minutes (denoted by -6) and there were two
pieces of censored data ( -50 and -66 minutes respectively). I have a
feeling that SAS is only looking at the right censored data. Also does
anyone know what the @@ on the input line does?

Would I be better off treating the data thus? (Censored data is denoted by a
minus sign)

5 -6 11 11 13 24 63 65 69 69 79 82 82 102 115  group 1
30 50 -50 51 -66 82 92  group 2
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------

    title 'Log Rank Test example : motion sickness D.Altman pg. 372';
    data logrank test;
            label minutes = 'minutes to failure';
                  group = 'group';
            input minutes @@;
            censor=(minutes<0);
            minutes=abs(minutes);
            group=(_n_>28);
            cards;

5 -6 11 11 13 24 63 65 69 69 79 82 82 102 115 -120 -120 -120 -120 -120 -120
-120 -120 -120
-120 -120 -120 -120 30 50 -50 51 -66 82 92 -120 -120 -120 -120 -120 -120
-120 -120 -120 -120
-120 -120 -120 -120 -120 -120 -120 -120 -120 -120 -120;


proc lifetest plots=(s,lls);
           time minutes*censor(1);
           strata group;
   run;

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------
Many thanks

Jon Cooke

Tel: 0208 383 4284

email: [log in to unmask]

Statistician
Care of the Elderly
Imperial College School of Medicine
Hammersmith Campus
Du Cane Road
LONDON
W12 0NN
___________________________________




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%