<?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 PROC PHREG with time dependent covariates giving odd results in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188352#M9818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm modeling time to event data with Cox regression (PROC PHREG). I have used PROC PHREG before without running into trouble.&lt;/P&gt;&lt;P&gt;Event of interest: heart failure.&lt;/P&gt;&lt;P&gt;Baseline variables: age, sex.&lt;/P&gt;&lt;P&gt;Time-dependent variables: cholesterol, blood pressure, blood glucose.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Each individual has several observations with start and stop time for each of these (see table below)..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked my data set, it is most likely correctly configured and looks like the table below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Showing an individual who experienced an event between his 3rd and 4th observation.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Subject&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;start_time&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;stop_time&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;cholesterol&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;event&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, you might notice the event indicator shows that the individual had an event on his last observation, despite the event occuring between the 3rd and 4th observation. This was instructed to me by an experienced statician; s&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;he told me that, in a time-dependent cox regression with counting process syntax, individuals who experience the event should have that indicated on their last observation; regardless of when the event occured.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This is somewhat non intuitive and &lt;/SPAN&gt;i wonder whether this is correct. Particularly since my results show that higher cholesterol, higher blood pressure and increasing age decreases the hazard ratio; this is certainly wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it something I am forgetting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate some advice on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Jan 2014 17:04:08 GMT</pubDate>
    <dc:creator>Adam1</dc:creator>
    <dc:date>2014-01-04T17:04:08Z</dc:date>
    <item>
      <title>PROC PHREG with time dependent covariates giving odd results</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188352#M9818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm modeling time to event data with Cox regression (PROC PHREG). I have used PROC PHREG before without running into trouble.&lt;/P&gt;&lt;P&gt;Event of interest: heart failure.&lt;/P&gt;&lt;P&gt;Baseline variables: age, sex.&lt;/P&gt;&lt;P&gt;Time-dependent variables: cholesterol, blood pressure, blood glucose.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Each individual has several observations with start and stop time for each of these (see table below)..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked my data set, it is most likely correctly configured and looks like the table below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Showing an individual who experienced an event between his 3rd and 4th observation.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Subject&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;start_time&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;stop_time&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;cholesterol&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;event&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, you might notice the event indicator shows that the individual had an event on his last observation, despite the event occuring between the 3rd and 4th observation. This was instructed to me by an experienced statician; s&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;he told me that, in a time-dependent cox regression with counting process syntax, individuals who experience the event should have that indicated on their last observation; regardless of when the event occured.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This is somewhat non intuitive and &lt;/SPAN&gt;i wonder whether this is correct. Particularly since my results show that higher cholesterol, higher blood pressure and increasing age decreases the hazard ratio; this is certainly wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it something I am forgetting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate some advice on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2014 17:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188352#M9818</guid>
      <dc:creator>Adam1</dc:creator>
      <dc:date>2014-01-04T17:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG with time dependent covariates giving odd results</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188353#M9819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't done one of these in quite a while (long enough ago that the counting process syntax wasn't available), so I'll venture a guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that what you are interested in is the 'initiation' of heart failure (in stochastic processes, heart failure would be an "absorbing event" -- once you have heart failure, you can never again 'not' have it).&amp;nbsp; To me, that is the only way that having a single event makes sense.&amp;nbsp;&amp;nbsp; In that case, covariates after the onset of heart failure do not contribute to your understanding of the incidence and should be discarded.&amp;nbsp; Then the event would be associated with the interval in which it occurred as well as the last interval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would also make the data consistent with what your local statistician said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 19:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188353#M9819</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2014-01-07T19:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG with time dependent covariates giving odd results</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188354#M9820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Muhlbaier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've carefully read your reply and I agree with it. However, it might be that the PROC PHREG handles the procedure this way. Moreover, I have not found a single SUGI paper commenting on this, neither in Paul Allisons book. Searched google extensively aswell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try your solution though, and get back to you with the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 14:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188354#M9820</guid>
      <dc:creator>Adam1</dc:creator>
      <dc:date>2014-01-08T14:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG with time dependent covariates giving odd results</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188355#M9821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has a lot to do with your definitiion of event.&amp;nbsp; If event is defined as the onset of heart failure and that, by definition, can only occur once (you and &lt;A href="mailto:Doc@Duke"&gt;&lt;/A&gt; Doc Muhlbaier would know better than I), then the remaining observations after the event occurrence only add bias by inflating the risk set at times where some individuals are no longer at risk (they have heart failure, but are no longer at risk of having the onset of heart failure, just like someone who died will always be dead, but will no longer be at risk for the even to dying)..&amp;nbsp; If this is the case here (only one event can occur and it is defined to have occurred at onset), then the indicator for event should be 1 for the interval that ends at onset.&amp;nbsp; So, if they had the event at time 7, then event should be 1 at the third interval.&amp;nbsp; In addition, for this analysis, the remaining observations beyond the third observation should not be included in the analysis.&amp;nbsp; Unless they are at risk for the onset of heart failure again, anything that occurs after onset is to be ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if heart failure were a repeatable event, then you would still have a 1 for event at the third interval, but you could also have a 1 at later intervals where the event occurred again.&amp;nbsp; Like I said, I am not an expert on heart failure, so I don't know what can happen.&amp;nbsp; However, I trust Doc Muhlbaier in his or her assertion that it cannot recur, since it cannot be undone (except by transplant?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you currently have (what your statistician friend suggested) can only be correct if the event itself is defined to have occurred at time 16.&amp;nbsp; So, for instance, if 'event' is defined to be death and that occcurred for this subject at time 16, then this might be correct.&amp;nbsp; If that were the case, then you can use heart failure as a predictor of death and then heart failure would be a separate indicator variable that can be used as a predictor.&amp;nbsp; It could be coded as '0' for all time intervals preceding onset of heart failure and 1 for all interals at onset until death (or censoring). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really have a repeatable event, then there are several models to choose from.&amp;nbsp; In most cases, you'd need to have another variable for event number, to indicate which event a subject is currently at risk for, and you'd have to adjust the model for the lack of independence of events within subject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 15:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188355#M9821</guid>
      <dc:creator>MarcHuber</dc:creator>
      <dc:date>2014-01-17T15:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG with time dependent covariates giving odd results</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188356#M9822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I completely agree with Marc's reply. The event should be at the observation where the event took place. The stop-time at that observation should be time of event, and this timeinterval has to be the last one for that individual.&lt;/P&gt;&lt;P&gt;I think it was also what you where advised to do by your statistician (the event should be at the last interval for an individual). Intervals after the event took place should be deleted.&lt;/P&gt;&lt;P&gt;Jacob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 22:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188356#M9822</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2014-01-30T22:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PHREG with time dependent covariates giving odd results</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188357#M9823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is still unclear to me why the statical recommended the fore mentioned data layout for individuals with events. It is now clear to me, after the above explanations and further discussions with other staticians that: individuals with events need no observations after the event time if the event is permanent (in this case, once heart failure, always heart failure).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your answers above!&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 21:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-PHREG-with-time-dependent-covariates-giving-odd-results/m-p/188357#M9823</guid>
      <dc:creator>Adam1</dc:creator>
      <dc:date>2014-02-17T21:00:26Z</dc:date>
    </item>
  </channel>
</rss>

