<?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: Time-dependent variables in PHREG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161449#M299776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, if interested in 0&amp;lt;time&amp;lt;6 then flag=1 will be used in PROC PHREG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 May 2014 14:44:06 GMT</pubDate>
    <dc:creator>stat_sas</dc:creator>
    <dc:date>2014-05-18T14:44:06Z</dc:date>
    <item>
      <title>Time-dependent variables in PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161445#M299772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have three datasets, each containing the values of a variable for a different 6-month period, and I'm trying to use their values as the time-dependent explanatory variable, in a proportional hazards model (PROC PHREG). Basically, from time 1 to time 6, I want the value of the explanatory variable to be the value from table 1; from time 7 to 12 I want the value of &lt;STRONG&gt;the same&lt;/STRONG&gt; explanatory variable to be the value from table 2, etc.&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;I know I will have to join all the datasets before I run PHREG, but my question is how do I flag them prior to that, to allow me to differentiate the values coming from each dataset?&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;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;(EDIT) To clarify what I mean:&lt;/STRONG&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;Dataset 1 contains the values of variable "Measurement" for the period Jan 2010 - Jun 2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Dataset 2 contains the values of variable "Measurement" for the period Jul 2011 - Dec 2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Dataset 3 contains the values of variable "Measurement" for the period Jan 2011 - Jun 2011&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;I want to combine the values of "Measurement" from all 3 datasets into one single model for PHREG, that selects the value from Dataset 1 during time 1 to time 6, the value from Dataset 2 from time 7 to time 12, and the value from Dataset 3 from time 13 to time 18. What would be a good and clean way to do this?&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;Greatly appreciate any help.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 07:30:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161445#M299772</guid>
      <dc:creator>misaochan</dc:creator>
      <dc:date>2014-05-16T07:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time-dependent variables in PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161446#M299773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone? Is there any additional information I could provide that would be helpful? I don't need help with the specifics of PHREG per se, just how to copy over same-variable values from other datasets and handle the differentiation in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 08:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161446#M299773</guid>
      <dc:creator>misaochan</dc:creator>
      <dc:date>2014-05-18T08:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time-dependent variables in PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161447#M299774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood your questions correctly. You are looking for combining 3 datasets and want to flag them. Please see the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data overall;&lt;/P&gt;&lt;P&gt;set dataset1(in=a) dataset2(in=b) dataset3(in=c);&lt;/P&gt;&lt;P&gt;if a then flag=1;&lt;/P&gt;&lt;P&gt;if b then flag=2;&lt;/P&gt;&lt;P&gt;if c then flag=3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure common variables must have the same attributes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 14:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161447#M299774</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-18T14:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Time-dependent variables in PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161448#M299775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, yes, that is the gist of it. But in the PROC PHREG code I will need to specify that I want to choose the values with flag=1 if 0&amp;lt;time&amp;lt;6. I think I will not be able to incorporate the flags into the model, as they will be a separate variable from the value itself?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 14:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161448#M299775</guid>
      <dc:creator>misaochan</dc:creator>
      <dc:date>2014-05-18T14:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Time-dependent variables in PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161449#M299776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, if interested in 0&amp;lt;time&amp;lt;6 then flag=1 will be used in PROC PHREG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 14:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-dependent-variables-in-PHREG/m-p/161449#M299776</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-18T14:44:06Z</dc:date>
    </item>
  </channel>
</rss>

