<?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: How do i write code and output datasets that include quartiles and pvalues using proc lifetest? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884692#M82837</link>
    <description>&lt;P&gt;Before worrying about output datasets, I would focus on getting the output results you want.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you run the PROC LIFETEST step, do you see the p-values you want?&amp;nbsp; When I run the step on sashelp.bmt, I get one p-value for a test of equality over strata.&amp;nbsp; There are 3 groups, but I get one p-value testing overall homogeneity.&amp;nbsp; Sounds like that's not what you want.&amp;nbsp; After you figure out how to get the output results you want, it should be possible use ODS to write the results to an output dataset.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 17:47:02 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2023-07-13T17:47:02Z</dc:date>
    <item>
      <title>How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884550#M82831</link>
      <description>&lt;P&gt;Hi, i'm doing a survival table for work and i'm having trouble with the syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to use PROC LIFETEST to produce quartiles and p values using a log rank test that is stratified by TRT (treatment) and loc (location). I'm using Kaplan-Meier estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far this is what i have, but it's not producing what i need. Can i receive some help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output quartiles=a;
proc lifetest data= mydata method=pl;
 time aval*cnsr(1);
 strata trt loc / test=logrank;
run;
ods output close;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2023 19:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884550#M82831</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2023-07-12T19:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884554#M82832</link>
      <description>&lt;P&gt;A bit old but possibly useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/d3bce2a9e2ef0523db9d" target="_blank"&gt;https://gist.github.com/statgeek/d3bce2a9e2ef0523db9d&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something else that may be useful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/MVMODELS-a-Macro-for-Survival-and-Logistic-Analysis/tac-p/877193#M7627" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/MVMODELS-a-Macro-for-Survival-and-Logistic-Analysis/tac-p/877193#M7627&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 19:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884554#M82832</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-07-12T19:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884656#M82833</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
Maybe your dataset have problem.
Can you post your dataset?
I test your code with SASHELP.BMT, 
and have no problem .
*/
proc lifetest data= sashelp.bmt method=pl;
 time t*status(0);
 strata group / test=logrank;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1689248808382.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85756i3B50CA2E41525291/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1689248808382.png" alt="Ksharp_0-1689248808382.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 11:46:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884656#M82833</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-07-13T11:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884664#M82834</link>
      <description>&lt;P&gt;Hi, you say:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;So far this is what i have, but it's not producing what i need. Can i receive some help?&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It sounds like your code is running without errors or warnings, is that correct?&amp;nbsp; Can you say more about how the results you are producing differ from the results you need?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884664#M82834</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-07-13T13:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884688#M82835</link>
      <description>i was trying to produce p values and output them with homtests= dsnout option. There are 4 treatment groups, with the first 3 being active, and the last one being placebo. &lt;BR /&gt;&lt;BR /&gt;The output was only producing one p value, even though i needed 3 since i'm comparing each group to placebo.</description>
      <pubDate>Thu, 13 Jul 2023 17:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884688#M82835</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2023-07-13T17:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884689#M82836</link>
      <description>Thanks, i think my set up is wrong as i'm trying to output p values.</description>
      <pubDate>Thu, 13 Jul 2023 17:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884689#M82836</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2023-07-13T17:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884692#M82837</link>
      <description>&lt;P&gt;Before worrying about output datasets, I would focus on getting the output results you want.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you run the PROC LIFETEST step, do you see the p-values you want?&amp;nbsp; When I run the step on sashelp.bmt, I get one p-value for a test of equality over strata.&amp;nbsp; There are 3 groups, but I get one p-value testing overall homogeneity.&amp;nbsp; Sounds like that's not what you want.&amp;nbsp; After you figure out how to get the output results you want, it should be possible use ODS to write the results to an output dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 17:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884692#M82837</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-07-13T17:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do i write code and output datasets that include quartiles and pvalues using proc lifetest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884694#M82838</link>
      <description>I think the best option would probably be to do 3 separate tests with the 4 groups, and to use a WHERE statement for the following combos:&lt;BR /&gt;where trt in (1,4)&lt;BR /&gt;where trt in (2,4)&lt;BR /&gt;where trt in (3, 4)&lt;BR /&gt;1:3 being active groups,&lt;BR /&gt;4 being placebo&lt;BR /&gt;&lt;BR /&gt;That would produce a p value for all the pairwise comparisons against placebo.</description>
      <pubDate>Thu, 13 Jul 2023 17:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-i-write-code-and-output-datasets-that-include-quartiles/m-p/884694#M82838</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2023-07-13T17:51:43Z</dc:date>
    </item>
  </channel>
</rss>

