<?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 at-risk table in proc phreg - recurrent event analysis in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/at-risk-table-in-proc-phreg-recurrent-event-analysis/m-p/934475#M46591</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I get get the at-risk table &lt;STRONG&gt;by treatment group&lt;/STRONG&gt; (variable 'trt') at specific end points say day (0, 100, 200, 300 etc.) from the phreg code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc phreg data=meds covs(aggregate) covm;
class trt(ref='B') strata(ref="1");
model (TSTART, TSTOP)*STATUS(0 2) = trt strata/ rl;
hazardratio "A vs. B" trt / diff=ref;
baseline covariates=covd out=outd cmf=_all_/nomean;
id subjid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 22:04:47 GMT</pubDate>
    <dc:creator>kc</dc:creator>
    <dc:date>2024-07-02T22:04:47Z</dc:date>
    <item>
      <title>at-risk table in proc phreg - recurrent event analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/at-risk-table-in-proc-phreg-recurrent-event-analysis/m-p/934475#M46591</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I get get the at-risk table &lt;STRONG&gt;by treatment group&lt;/STRONG&gt; (variable 'trt') at specific end points say day (0, 100, 200, 300 etc.) from the phreg code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc phreg data=meds covs(aggregate) covm;
class trt(ref='B') strata(ref="1");
model (TSTART, TSTOP)*STATUS(0 2) = trt strata/ rl;
hazardratio "A vs. B" trt / diff=ref;
baseline covariates=covd out=outd cmf=_all_/nomean;
id subjid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 22:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/at-risk-table-in-proc-phreg-recurrent-event-analysis/m-p/934475#M46591</guid>
      <dc:creator>kc</dc:creator>
      <dc:date>2024-07-02T22:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: at-risk table in proc phreg - recurrent event analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/at-risk-table-in-proc-phreg-recurrent-event-analysis/m-p/934903#M46601</link>
      <description>&lt;P&gt;You should use the LIFETEST instead of the PHREG procedure for obtaining the at-risk table. Like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc lifetest data=meds;
strata trt(ref='B') strata(ref="1");
time eventtime*status(0,2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I noticed that you used the counting process style of input in your MODEL statement of the PHREG procedure syntax. You should modify the dataset and store the observed survival time in one variable when applying the code above. The observed survival time is stored in a variable named eventtime in the code I provide.&lt;/P&gt;
&lt;P&gt;There is an issue I am not that sure if the LIFETEST procedure can perform well. You mentioned that your post that your were analyzing recurrent events. I checked out the part of SAS Help relating to the LIFETEST procedure and found that while it can readily handle the case of competing-risk analyses, it has no built-in commands for the analysis of recurrent events.&lt;/P&gt;
&lt;P&gt;I think maybe you should modify your dataset such that one observation corresponds to one occurrence of event or censoring. For instance, if a subject experienced the event of interest at time 5, 12 and 26 and censored at time 52. Then the subject corresponds to four observations in the dataset, with the variable named eventtime taking values of 5, 12, 26 and 52 respectively and the variable named status taking values of 1 (I designate 1 as occurring the event of interest here), 1, 1 and 0 (or 2) respectively.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 08:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/at-risk-table-in-proc-phreg-recurrent-event-analysis/m-p/934903#M46601</guid>
      <dc:creator>Season</dc:creator>
      <dc:date>2024-07-07T08:51:48Z</dc:date>
    </item>
  </channel>
</rss>

