<?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 to generate cumulative mean function by considering competing events in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939934#M369000</link>
    <description>&lt;P&gt;data is&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 288pt; box-sizing: border-box; empty-cells: show; border-spacing: 0px; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="6" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.75pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="21" class="xl63" style="height: 15.75pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;TStart&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;TStop&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;Status&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;Trt&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;Age&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl65" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;174054&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;293&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;1&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;38&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl67" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;204001&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;219&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;1&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl67" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;204001&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;219&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;373&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl67" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;204001&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;373&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;414&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;I am sorry for the typo, It should be eventcode=1.&lt;/P&gt;
&lt;P&gt;Actually I got some warnings. It seems cmf cannot work with Fine and Gray competing risk analysis together? So how can I write the code to generate mcf and competing risk together?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaMoon_168_0-1724087669487.png" style="width: 618px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99409i6126D5AE79A5CDDF/image-dimensions/618x59?v=v2" width="618" height="59" role="button" title="SeaMoon_168_0-1724087669487.png" alt="SeaMoon_168_0-1724087669487.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2024 17:17:48 GMT</pubDate>
    <dc:creator>SeaMoon_168</dc:creator>
    <dc:date>2024-08-19T17:17:48Z</dc:date>
    <item>
      <title>How to generate cumulative mean function by considering competing events</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939818#M368969</link>
      <description>&lt;P&gt;The original code can be accessed from SAS:&amp;nbsp;Analysis of Multivariate Failure Time Data&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_phreg_details45.htm#statug_phreg012597" target="_blank"&gt;https://documentation.sas.com/doc/en/statug/15.2/statug_phreg_details45.htm#statug_phreg012597&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;proc phreg covs(aggregate);
   model (Tstart,Tstop)*Status(0)=Trt Age;
   baseline covariates=Pattern out=out2 cmf=_all_;
   id ID;
run;&lt;/PRE&gt;
&lt;P&gt;However, if I add eventcode=1, the code does not work.&lt;/P&gt;
&lt;PRE&gt;proc phreg covs(aggregate);
   model (Tstart,Tstop)*Status(0)=Trt Age/ evencode=1;
   baseline covariates=Pattern out=out2 cmf=_all_;
   id ID;
run;&lt;/PRE&gt;
&lt;P&gt;Can anyone help me figure it out? Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 03:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939818#M368969</guid>
      <dc:creator>SeaMoon_168</dc:creator>
      <dc:date>2024-08-19T03:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate cumulative mean function by considering competing events</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939922#M368993</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming of course your submitted code was EVENTCODE=1 not the EVENCODE shown in your post.&lt;/P&gt;
&lt;P&gt;Quite often the LOG does have related information that you should share.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 16:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939922#M368993</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-19T16:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate cumulative mean function by considering competing events</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939934#M369000</link>
      <description>&lt;P&gt;data is&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 288pt; box-sizing: border-box; empty-cells: show; border-spacing: 0px; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="6" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.75pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="21" class="xl63" style="height: 15.75pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;TStart&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;TStop&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;Status&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;Trt&lt;/TD&gt;
&lt;TD width="64" class="xl64" style="width: 48pt;"&gt;Age&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl65" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;174054&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;293&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;1&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;38&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl67" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;204001&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;219&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;1&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl67" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;204001&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;219&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;373&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 17.25pt; box-sizing: border-box;"&gt;
&lt;TD width="64" height="23" class="xl67" style="height: 17.25pt; width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;204001&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;373&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;414&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;0&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;2&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="width: 48pt; box-sizing: border-box; padding: 0.4rem 0.5rem;"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;I am sorry for the typo, It should be eventcode=1.&lt;/P&gt;
&lt;P&gt;Actually I got some warnings. It seems cmf cannot work with Fine and Gray competing risk analysis together? So how can I write the code to generate mcf and competing risk together?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaMoon_168_0-1724087669487.png" style="width: 618px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99409i6126D5AE79A5CDDF/image-dimensions/618x59?v=v2" width="618" height="59" role="button" title="SeaMoon_168_0-1724087669487.png" alt="SeaMoon_168_0-1724087669487.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 17:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/939934#M369000</guid>
      <dc:creator>SeaMoon_168</dc:creator>
      <dc:date>2024-08-19T17:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate cumulative mean function by considering competing events</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/940060#M369040</link>
      <description>&lt;P&gt;1)&lt;BR /&gt;I think you need to change your data structure(a subject has only one obs/Time/Status) to use EVENTCODE=1.&lt;BR /&gt;You can " create a time-varying covariate using programming statements in proc phreg." other than this kind of data structure [TStart, TStop] .&lt;BR /&gt;And Here is an example: &lt;BR /&gt;(here 'in_hosp' is a time-varying covariate)&lt;BR /&gt;proc phreg covs(aggregate);&lt;BR /&gt;model Time*Status(0)=Trt Age in_hosp/ evencode=1;&lt;BR /&gt;if Time&amp;gt; 219 then in_hosp = 0;&lt;BR /&gt;else in_hosp = 1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2)&lt;BR /&gt;If you don't have time-varying covariates, that would be better to use this code:&lt;BR /&gt;(Make sure a subject has only an obs and a TIME value and a STATUS value)&lt;BR /&gt;proc phreg covs(aggregate);&lt;BR /&gt;model Time*Status(0)=Trt Age/ evencode=1;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 08:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-cumulative-mean-function-by-considering/m-p/940060#M369040</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-08-20T08:21:34Z</dc:date>
    </item>
  </channel>
</rss>

