Hi, I have a data including trt variable and resp variable, below is the unique value.
proc sql;select distinct trt, resp from data;run;
Then I use this data to create survival data by proc lifetest, but the "survival" data from the ods output has a trt group that does not exist in the data, which looks very odd...
proc lifetest data=data timelist=(0 to 12 by 1) atrisk outsurv=surviv ;
by trt ;
time aval*cnsr(1);
strata resp ;
ods output SurvivalPlot=survival ProductLimitEstimates=atrisk Quartiles=Quartiles;
run;
proc sql;select distinct trt, Stratum, StratumNum from survival;run;
For trt=2, the resp changes to "PR(N=70)" instead of "PR(N=5)". It follows the trt=1...
Does anyone knows why this wrong Stratum is output ? How to fix it ?
Show every bit of code that you ran between that Proc SQL (which would still be running for quite a while as
SQL should terminate with QUIT; instead of RUN;) and that Proc Lifetest.
On possibility is if you are in the habit of using code like the following then you may have had a logic error changing values.
data data; set data; /* manipulation goes here*/ run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.