<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Displaying at risk tables under kaplan meier in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/465160#M70926</link>
    <description>&lt;P&gt;Hi I guess you want to create something like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="AtRiskPlot.JPG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40347iEF3C968BC325D80F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AtRiskPlot.JPG" alt="AtRiskPlot.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get this, by following this procedure:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create the survival plot as described by&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;before&lt;/LI&gt;
&lt;LI&gt;Save the combined table under the group outline (open outline of first group, right click into the table, Make Combined Data Table)&lt;/LI&gt;
&lt;LI&gt;In the new data table it is a good idea to change the Day to ordinal and change the format to 0 decimal places, as well right click on the AtRisk column in the column panel at the middle left of the data table, and select Use for marker. This will show the actual numbers instead of points in the graph we build up&lt;/LI&gt;
&lt;LI&gt;Graph Builder, day on X, Survival on Y, change to the line element, then select step instead of line in the options for the line element&lt;/LI&gt;
&lt;LI&gt;Now put Group on Y &lt;STRONG&gt;beneath&lt;/STRONG&gt; Survival (not on top!), Put Group also as Overlay.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Last is to use the filter to only select the groups and not the combined one.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;As you will get all the AtRisk Values displayed, you may want to add columns for the required days, e.g. 150, 200, 250, 300, 350 and copy the values of the row with the closest smaller day number into the line respectively. Then use just these as labels. Not sure if this will be very easy compared to a script, but you should get at least close to what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, a combined window of the survival plot (in the survival platform or in Graph Builder) plus a table created with tabular or summarize, then tabular, will work in a similar fashion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8144"&gt;@ghartel&lt;/a&gt;&amp;nbsp;, you mentioned a wish list entry. I cannot find it. Would be great if you could post the link to the entry here, so anyone interested in this can give a kudo to your wish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Feb 2022 10:57:01 GMT</pubDate>
    <dc:creator>martindemel</dc:creator>
    <dc:date>2022-02-28T10:57:01Z</dc:date>
    <item>
      <title>Displaying at risk tables under kaplan meier</title>
      <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55338#M31302</link>
      <description>&lt;P&gt;Hi I am wondering how I can get a Kaplan Meier plot with the corresponding at risk tables displayed underneath?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2018 22:05:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55338#M31302</guid>
      <dc:creator>chum</dc:creator>
      <dc:date>2018-04-21T22:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying at risk tables under kaplan meier</title>
      <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55343#M31306</link>
      <description>&lt;P&gt;Select &lt;STRONG&gt;Analyze&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Reliability and Survival&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Life Distribution&lt;/STRONG&gt;. Enter your time to event variable in the &lt;STRONG&gt;Time&lt;/STRONG&gt; role and click &lt;STRONG&gt;OK&lt;/STRONG&gt;. Click the red triangle when the platform opens and deselect &lt;STRONG&gt;Show Points&lt;/STRONG&gt;. The table is initially closed but it appears directly below the probability plot.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 13:06:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55343#M31306</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-04-22T13:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying at risk tables under kaplan meier</title>
      <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55348#M31309</link>
      <description>&lt;P&gt;How do I get a graph looking like this? I would like the at risk numbers displayed below the Kaplan Meier table. Thank you.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://blogs.sas.com/content/graphicallyspeaking/files/2014/02/SurvivalPlot_AxisTable_Outside_94_SG.png" border="0" alt="Image result for kaplan meier with at risk table" width="736" height="442" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 22:03:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55348#M31309</guid>
      <dc:creator>chum</dc:creator>
      <dc:date>2018-04-22T22:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying at risk tables under kaplan meier</title>
      <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55368#M31322</link>
      <description>&lt;P&gt;Try &lt;STRONG&gt;Analyze&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Reliability and Survival&lt;/STRONG&gt; &amp;gt;&amp;nbsp; &lt;STRONG&gt;Survival&lt;/STRONG&gt; with the life time data column in the &lt;STRONG&gt;Y, Time to Event&lt;/STRONG&gt; role, the censoring indication data column (if there is one) in the &lt;STRONG&gt;Censor&lt;/STRONG&gt; role, and the group membership data column in the &lt;STRONG&gt;Grouping&lt;/STRONG&gt; role. Here is an example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 532px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10461i552AD33E197D9725/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Click &lt;STRONG&gt;OK&lt;/STRONG&gt; and you will see the desired plot at the top of the window:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 505px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10462i2F5A5A84D9AD42CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I do not understand the 'at risk&amp;nbsp;table' that you show. I do not think that JMP provides this table directly but it can probably be obtained with a&amp;nbsp;summary action on the estimates.&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 505px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10463i5BDA32EB01701EE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The original suggestion of using the Life Distribution platform with the Compare Groups tab might also work.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 09:39:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/55368#M31322</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-04-23T09:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying at risk tables under kaplan meier</title>
      <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/305898#M56162</link>
      <description>&lt;P&gt;Journals frequently require survival plots to be formatted as in the example at the top (eg &lt;A href="https://jamanetwork.com/journals/jamaoncology/pages/instructions-for-authors" target="_blank" rel="noopener"&gt;https://jamanetwork.com/journals/jamaoncology/pages/instructions-for-authors&lt;/A&gt;). 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.&amp;nbsp; I've thought that maybe the graphbuilder could be used to create this plot ( cf forest plot addin &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5695"&gt;@Richard_Zink&lt;/a&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 )} ), )
) &amp;lt;&amp;lt; report;

obj[List Box( 2 )] &amp;lt;&amp;lt; append( Table Box( String Col Box( "No at Risk | Day", lv ) ) );
Tab1 = (obj[lv[1]][Table Box( 1 )] &amp;lt;&amp;lt; get);
Tab2 = (obj[lv[2]][Table Box( 1 )] &amp;lt;&amp;lt; get);
For( T = minT, T &amp;lt;= maxT, T += stepT,
	lp = Max( Loc( Matrix( Tab1["days"] ) &amp;lt;= T ) );
	AR1 = Tab1["At Risk"][lp];
	lp = Max( Loc( Matrix( Tab2["days"] ) &amp;lt;= T ) );
	AR2 = Tab2["At Risk"][lp];
	obj[List Box( 2 )][Table Box( 1 )] &amp;lt;&amp;lt; append( Number Col Box( Char( T ), {AR1, AR2} ) );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 06:32:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/305898#M56162</guid>
      <dc:creator>ghartel</dc:creator>
      <dc:date>2020-09-13T06:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying at risk tables under kaplan meier</title>
      <link>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/465160#M70926</link>
      <description>&lt;P&gt;Hi I guess you want to create something like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="AtRiskPlot.JPG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40347iEF3C968BC325D80F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AtRiskPlot.JPG" alt="AtRiskPlot.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get this, by following this procedure:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create the survival plot as described by&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;before&lt;/LI&gt;
&lt;LI&gt;Save the combined table under the group outline (open outline of first group, right click into the table, Make Combined Data Table)&lt;/LI&gt;
&lt;LI&gt;In the new data table it is a good idea to change the Day to ordinal and change the format to 0 decimal places, as well right click on the AtRisk column in the column panel at the middle left of the data table, and select Use for marker. This will show the actual numbers instead of points in the graph we build up&lt;/LI&gt;
&lt;LI&gt;Graph Builder, day on X, Survival on Y, change to the line element, then select step instead of line in the options for the line element&lt;/LI&gt;
&lt;LI&gt;Now put Group on Y &lt;STRONG&gt;beneath&lt;/STRONG&gt; Survival (not on top!), Put Group also as Overlay.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Last is to use the filter to only select the groups and not the combined one.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;As you will get all the AtRisk Values displayed, you may want to add columns for the required days, e.g. 150, 200, 250, 300, 350 and copy the values of the row with the closest smaller day number into the line respectively. Then use just these as labels. Not sure if this will be very easy compared to a script, but you should get at least close to what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, a combined window of the survival plot (in the survival platform or in Graph Builder) plus a table created with tabular or summarize, then tabular, will work in a similar fashion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8144"&gt;@ghartel&lt;/a&gt;&amp;nbsp;, you mentioned a wish list entry. I cannot find it. Would be great if you could post the link to the entry here, so anyone interested in this can give a kudo to your wish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 10:57:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Displaying-at-risk-tables-under-kaplan-meier/m-p/465160#M70926</guid>
      <dc:creator>martindemel</dc:creator>
      <dc:date>2022-02-28T10:57:01Z</dc:date>
    </item>
  </channel>
</rss>

