Hi
Thank you for your inputs and helps on this topic.
I was able to run the proc lifetest and phreg but confused, which datasets need to be used to get the information since outputs produces so much information . I need to get the following information. I was providing dataset I have.
/* Create the original dataset */
*Information in data
AVAL ->Number of Days after the Treatment that Adverse Event Occurred"
CNSR-> If the event occurred, then CNSR =0 otherwise, 1
ARM-> IND and Placebo;
data have;
input USUBJID ARM AVAL CNSR;
datalines;
1 1 1 1
2 1 2 0
3 1 10 1
4 2 5 1
5 2 6 0
6 2 8 1
7 2 10 0
8 2 11 0
9 1 12 1
10 2 13 1
11 2 15 1
12 1 10 0
13 1 18 1
14 2 19 0
15 2 21 1
16 1 23 1
17 1 5 1
18 2 25 1
;
run;
data have;
set have;
if arm = 1 the TRT = 'Placebo';
if arm =2 then TRT = 'IND';
run;
** for Quartiles and estimates/ Not using any from Estimates data**
proc lifetest method=KM data=have plots=none;*timelist=(5,10,15);
strata arm;
time aval*cnsr(1);
ods output productlimitestimates = estimates
Quartiles = quart;
run;
** for HR and 95 %CI/ Not sure where to get P- value**;
proc phreg data=have;
class arm (ref='2');
model aval*cnsr(1) = arm / risklimits ties=efron rl;
hazardratio arm / diff=ref;
ods output ParameterEstimates = hR;
run;
*** for adverse event free probability and 95% CI at day 10**;
proc lifetest method=KM data=have plots=none timelist=(5,10,15);
strata arm;
time aval*cnsr(1);
ods output productlimitestimates = estiTime;
run;
From PHREG: Cox Model
1 . Probability (IND Vs Placebo) - P-value
2. Hazard Ratio (IND Vs Placebo)
3 . 95% CI (IND Vs Placebo)
From PROC LIFETEST:
Quartiles:
1. Q1 with 95%CI
2. Q3 with 95% CI
3. Median with 95% CI
From PROC LIFETEST:
Adverse Event Free probability at Day 10
... View more