BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tiny_Kane
Obsidian | Level 7

Hi there, I have the code below to run competing risk analysis and try to plot the CIF curves using proc sgplot. But I found the column of censored in the outcif dataset has values 0, 1, 2, and 3. I guess 0 means event of interest happened, 1 means there was censoring. I wonder what 2 and 3 mean? By the way, my event code is: 0=event free, 1=event of interest, 2=competing events 

proc lifetest data=master2 plots=CIF(test) outcif=cif1 timelist=0 to 60 by 12;
time months_to_scenario1*event_scenario1(0)/eventcode=1;
strata study_id;
run;

data cif1;
set cif1;
if Censored=1 then cenp=cif;
run;
proc sgplot data=cif1;
step x=months_to_scenario1 y=cif/group=study_id;
scatter x=months_to_scenario1 y=cenp / markerattrs=(symbol=plus) GROUP=study_id;
xaxis values=(0 to 60 by 12);
run;

 

Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @Tiny_Kane,

 

Variable Censored contains the number of censored subjects for the stratum-(group-)time combination summarized by the respective observation of the OUTCIF= dataset. So, value 3, for example, indicates that 3 subjects within the same stratum (and group, if any) must have been censored at the same time. Hence, you should change the conditional definition of variable cenp to, e.g.

if Censored then cenp=cif;

Due to the aggregation to distinct failure times in the OUTCIF= dataset those 3 subjects will be represented by a single plot symbol (even with jittering).

 

This is really not quite clear from the documentation "OUTCIF= Data Set," which suggests that the original censoring variable is included (which couldn't reflect the aggregation to distinct failure times, though). There are more imperfections: Variable Failcode is not mentioned and variable StdErr is called CIF_STDERR.

 

The label of variable Censored, "Number Censored," helped me to find this answer (which I confirmed by tests with modified sample data from the documentation).

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hi @Tiny_Kane,

 

Variable Censored contains the number of censored subjects for the stratum-(group-)time combination summarized by the respective observation of the OUTCIF= dataset. So, value 3, for example, indicates that 3 subjects within the same stratum (and group, if any) must have been censored at the same time. Hence, you should change the conditional definition of variable cenp to, e.g.

if Censored then cenp=cif;

Due to the aggregation to distinct failure times in the OUTCIF= dataset those 3 subjects will be represented by a single plot symbol (even with jittering).

 

This is really not quite clear from the documentation "OUTCIF= Data Set," which suggests that the original censoring variable is included (which couldn't reflect the aggregation to distinct failure times, though). There are more imperfections: Variable Failcode is not mentioned and variable StdErr is called CIF_STDERR.

 

The label of variable Censored, "Number Censored," helped me to find this answer (which I confirmed by tests with modified sample data from the documentation).

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 484 views
  • 0 likes
  • 2 in conversation