Dear all,
I have been trying to calculate survival estimates probabilities and standard error from a dataset where I performed multiple imputation.
I wrote the following code, because, for each dataset imputed, I would like to obtain a survival curve for treated and another for untreated. Of course, Have is sorted by group.
The problem is that, every time I run the code, SAS is not responding and I have to restart the software... Have you ever run something similar? I think that the problem is with the statement strata because, without it works fine.
Thanks!!
proc lifetest data= Have outsurv=Want;
time followup*event(0);
by group;
strata _Imputation;
weight sw;
run;
Have you tried "strata _imputation_" ?
You should not put the _IMPUTATION_ variable on the STRATA statement. It should appear on the BY statement so that each data set gets an independent analysis.
Hi @SAS_Rob ,
If I put _Imputation_ in the by statement I will obtain five (in my case) survival curves, one for each imputed dataset, while I would like to obtain two curves for each imputed dataset, one for treated and the other for untreated, for each imputed dataset.
I can divide the imputed dataset in 5 sub-dataset based on the value on _Imputation_ and apply the previous script without the strata statement.
However, I was wondering if there is a faster way to obtain the same result without running 5 different proc lifetest..
If you want curves for treated (events?) and untreated (censored?) separately then it seems you would have to run two PROC LIFETEST steps for each imputed data set. That would mean 10 PROC LIFETEST steps. I don't see any other way around this.
If you want two separate curves per imputed data set then you should place both variables on the BY statement.
BY _IMPUTATION_ GROUP;
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.