Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
chum
Level I

Displaying at risk tables under kaplan meier

Hi I am wondering how I can get a Kaplan Meier plot with the corresponding at risk tables displayed underneath?

Thank you.

4 REPLIES 4
Highlighted

Re: Displaying at risk tables under kaplan meier

Select Analyze > Reliability and Survival > Life Distribution. Enter your time to event variable in the Time role and click OK. Click the red triangle when the platform opens and deselect Show Points. The table is initially closed but it appears directly below the probability plot.

Learn it once, use it forever!
Highlighted
chum
Level I

Re: Displaying at risk tables under kaplan meier

How do I get a graph looking like this? I would like the at risk numbers displayed below the Kaplan Meier table. Thank you.

Image result for kaplan meier with at risk table

Highlighted

Re: Displaying at risk tables under kaplan meier

Try Analyze > Reliability and SurvivalSurvival with the life time data column in the Y, Time to Event role, the censoring indication data column (if there is one) in the Censor role, and the group membership data column in the Grouping role. Here is an example:

Capture.PNG

Click OK and you will see the desired plot at the top of the window:

Capture.PNG

I do not understand the 'at risk table' that you show. I do not think that JMP provides this table directly but it can probably be obtained with a summary action on the estimates.

You can obtain the estimates by opening the outline at the bottom of the window for any group or the combined observations. For example, here is Group=1 estimates:

Capture.PNG

The original suggestion of using the Life Distribution platform with the Compare Groups tab might also work.

Learn it once, use it forever!
Highlighted
ghartel
Level III

Re: Displaying at risk tables under kaplan meier

Journals frequently require survival plots to be formatted as in the example at the top (eg https://jamanetwork.com/journals/jamaoncology/pages/instructions-for-authors). I've put that in my JMP wishlist to have this as an option. The closest I can get at the moment is to append a table box with the relevant numbers, but I can't quite get the table size to align with the survival plot, but it's close enough to edit it further in the Journal. I would be grateful for any suggestions how to improve this or if there is an Addin that makes this happen.  I've thought that maybe the graphbuilder could be used to create this plot ( cf forest plot addin @Richard_Zink)

 

dt = Open( "$SAMPLE_DATA/Rats.jmp" );
minT = 100;
maxT = 350;
stepT = 50;

Summarize( lv = by( :Group ) );
obj = Survival(
	Y( :days ),
	Censor( :Censor ),
	Grouping( :Group ),
	Show Points( 1 ),
	SendToReport( Dispatch( {"Survival Plot"}, "1", ScaleBox, {Min( minT ), Max( maxT ), Inc( stepT ), Minor Ticks( 1 )} ), )
) << report;

obj[List Box( 2 )] << append( Table Box( String Col Box( "No at Risk | Day", lv ) ) );
Tab1 = (obj[lv[1]][Table Box( 1 )] << get);
Tab2 = (obj[lv[2]][Table Box( 1 )] << get);
For( T = minT, T <= maxT, T += stepT,
	lp = Max( Loc( Matrix( Tab1["days"] ) <= T ) );
	AR1 = Tab1["At Risk"][lp];
	lp = Max( Loc( Matrix( Tab2["days"] ) <= T ) );
	AR2 = Tab2["At Risk"][lp];
	obj[List Box( 2 )][Table Box( 1 )] << append( Number Col Box( Char( T ), {AR1, AR2} ) );
);

 

Article Labels

    There are no labels assigned to this post.