BookmarkSubscribeRSS Feed
sstoline
Calcite | Level 5

Dear All:

 

I do need your help with the “log-rank test” and “Kaplan Meier actuarial plots (time to event curve)” with adding the confidence intervals bands for the average score for each time to the curve of each group.

 

Group variable: 1 = group 1, 2 = group 2

 

Time points: time1, time2, time3, time4, time5

 

The goal is to compare the average scores of the two groups at each time point and obtain the Kaplan Meier actuarial plots (time to event curve) for the 5 time points for both groups in the plot.

 

Please use the following data for the test.

 

time1    time2    time3    time4    time5    groups

0              0              1              1              1              1

0              4              0              1              1              1

0              0              3              1              1              1

0              2              0              1              1              1

0              0              3              0              0              1

0              0              0              1              2              1

0              1              1              1                              1

0              0              2              1              1              1

0              3              1              1              1              1

0              0              0              1                              1

0              0              1              0              0              1

0              0              0              1              1              1

0              1              1              0              1              1

0              0              1              3              4              1

0              1              0              0              0              1

0              1              1              1              2              1

0              1              1              4              1              1

0              0              0              0                              1

0              2              1              1              2              1

                                                                                2

0              0              0              0              0              2

                                                                                2

0                                                                              2

0              0              3              2              2              2

0              3              0              1              1              2

0              0              1              1              1              2

0                                                                              2

0              0              0              1              1              2

0              1              2              0              1              2

0              0              1              1                              2

0              0              1              1              2              2

0              1              1              1              1              2

0              0              0              1              1              2

0              0              1              1              1              2

                                                                                2

0              2              2              1                              2

0              0              1              1                              2

0              0              0              0              0              2

0              3              3              1              2              2

0              1              1              1                              2

0              0              0              1              1              2

0              1              1              1              4              2

0              1              1              1              1              2

0              1              2              1              3              2

 

 

The graph should look like the attached graph (just as an example), the bigger data set is attached (please see attached).:

 

 

 

 

 

Thank you in advance

steve

2 REPLIES 2
sstoline
Calcite | Level 5

Dear All:

 

I do need your help with the “log-rank test” and “Kaplan Meier actuarial plots (time to event curve)” with adding the confidence intervals bands for the average score for each time to the curve of each group.

 

Group variable: 1 = group 1, 2 = group 2

 

Time points: time1, time2, time3, time4, time5

 

The goal is to compare the average scores of the two groups at each time point and obtain the Kaplan Meier actuarial plots (time to event curve) for the 5 time points for both groups in the plot.

 

Please use the following data for the test.

 

time1    time2    time3    time4    time5    groups

0              0              1              1              1              1

0              4              0              1              1              1

0              0              3              1              1              1

0              2              0              1              1              1

0              0              3              0              0              1

0              0              0              1              2              1

0              1              1              1                              1

0              0              2              1              1              1

0              3              1              1              1              1

0              0              0              1                              1

0              0              1              0              0              1

0              0              0              1              1              1

0              1              1              0              1              1

0              0              1              3              4              1

0              1              0              0              0              1

0              1              1              1              2              1

0              1              1              4              1              1

0              0              0              0                              1

0              2              1              1              2              1

                                                                                2

0              0              0              0              0              2

                                                                                2

0                                                                              2

0              0              3              2              2              2

0              3              0              1              1              2

0              0              1              1              1              2

0                                                                              2

0              0              0              1              1              2

0              1              2              0              1              2

0              0              1              1                              2

0              0              1              1              2              2

0              1              1              1              1              2

0              0              0              1              1              2

0              0              1              1              1              2

                                                                                2

0              2              2              1                              2

0              0              1              1                              2

0              0              0              0              0              2

0              3              3              1              2              2

0              1              1              1                              2

0              0              0              1              1              2

0              1              1              1              4              2

0              1              1              1              1              2

0              1              2              1              3              2

 

 

The graph should look like the attached graph (just as an example).

 

 

 

Thank you in advance

steve

ballardw
Super User

Some of what you want may be available from Proc Lifetest but i think you will have to change your data layout to something more liike

 

Group Time ResponseValue

1           1            0

1           2            0

1           3            1

1           4            1

1           5            1

1           1            0

1           2            4

1           3            0

1           4            1

1           5            1

 

etc.

Proc Transpose will do that but you may need to add a record identifier first if you don't have one.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1784 views
  • 0 likes
  • 2 in conversation