I would like to get 95% confidence interval for failure rate - an example would be perfect!
Thanks.
Hi @kc,
@kc wrote:
... but, using OUTSURV dataset gives CL for survival estimates not failure.
Yes, but you can calculate one from the other: failure rate = 1 − survival rate.
@kc wrote:
I believe values in _1_SDF_LCL_ and _1_SDF_UCL_ represent 95% CL for failure rates but the labels are switched? (Because _1_SDF_LCL_ > _1_SDF_UCL_ )
The variable names are correct (and the variable labels "1-SDF_LCL" and "1-SDF_UCL" are even clearer). As a consequence of the above relationship between the two rates, the LCL of the failure rate equals 1 − the UCL of the survival rate and the UCL of the failure rate equals 1 − the LCL of the survival rate. The survival rates (more precisely: survival probabilities) are the values of the survival distribution function (SDF). This also answers your next question:
@kc wrote:
Question: Not sure why this is happening. Is it safe to assume _1_SDF_LCL_ is indeed UCL for failure rate and _1_SDF_UCL_ is in fact LCL?
So, you'll get the same results from the failureplot ODS output dataset as you get by simply transforming the corresponding values from the OUTSURV= dataset (that @SteveDenham suggested) as described above.
Example:
/* Create test data */
data have;
call streaminit(27182818);
do id=1 to 200;
t=ceil(rand('expo',250));
censored=rand('bern',0.2);
output;
end;
run;
/* Compute survival estimates */
proc lifetest data=have outsurv=os noprint;
time t*censored(1);
run;
/* Derive failure estimates */
data want;
set os;
failure=1-survival;
if _censor_ ne 1 then do;
lcl=1-sdf_ucl;
ucl=1-sdf_lcl;
end;
run;
Add an OUTSURV= <data set name> to your PROC LIFETEST statement. It will contain confidence bounds for each strata.
SteveDenham
Hi @kc,
@kc wrote:
... but, using OUTSURV dataset gives CL for survival estimates not failure.
Yes, but you can calculate one from the other: failure rate = 1 − survival rate.
@kc wrote:
I believe values in _1_SDF_LCL_ and _1_SDF_UCL_ represent 95% CL for failure rates but the labels are switched? (Because _1_SDF_LCL_ > _1_SDF_UCL_ )
The variable names are correct (and the variable labels "1-SDF_LCL" and "1-SDF_UCL" are even clearer). As a consequence of the above relationship between the two rates, the LCL of the failure rate equals 1 − the UCL of the survival rate and the UCL of the failure rate equals 1 − the LCL of the survival rate. The survival rates (more precisely: survival probabilities) are the values of the survival distribution function (SDF). This also answers your next question:
@kc wrote:
Question: Not sure why this is happening. Is it safe to assume _1_SDF_LCL_ is indeed UCL for failure rate and _1_SDF_UCL_ is in fact LCL?
So, you'll get the same results from the failureplot ODS output dataset as you get by simply transforming the corresponding values from the OUTSURV= dataset (that @SteveDenham suggested) as described above.
Example:
/* Create test data */
data have;
call streaminit(27182818);
do id=1 to 200;
t=ceil(rand('expo',250));
censored=rand('bern',0.2);
output;
end;
run;
/* Compute survival estimates */
proc lifetest data=have outsurv=os noprint;
time t*censored(1);
run;
/* Derive failure estimates */
data want;
set os;
failure=1-survival;
if _censor_ ne 1 then do;
lcl=1-sdf_ucl;
ucl=1-sdf_lcl;
end;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.