<?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 make a time-dependent variable in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432290#M13396</link>
    <description>I only have 5 participants (Case Ids 1 to 5). But, there are more than 5 observations because each participant answer's to the question "are you employed currently?" changed over time. I want to take this change into account when doing the Proc Phreg. Thank you</description>
    <pubDate>Tue, 30 Jan 2018 16:05:48 GMT</pubDate>
    <dc:creator>Sinakian1</dc:creator>
    <dc:date>2018-01-30T16:05:48Z</dc:date>
    <item>
      <title>How to make a time-dependent variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432260#M13390</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate if you could please help me with the following question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three variables, Year_of_visit, employment status (UNEMP), and HIV_ status. I also have 5 participants. Participants were asked about their employment status in different years. When the UNEMP is 0 it means the person is employed and when it is 1 it means the person is not employed. In each year of visit, they were also tested for HIV status. If HIV test is 0 then the person is not infected if HIV_status is 1 then they are infected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am conducting a survival analysis (using PROC PHREG) on the association between the Unemployment (UNEMP) and HIV outcome. However, the employment status of participants changes in different years. For instance, Case ID 1 is employed in years 2000 and 2001, then she was unemployed in years 2002 and 2003, and finally, she became employed again in 2004. Hence, the Unemp variable is time-dependent and changes over time. I&amp;nbsp;want to make a third &lt;U&gt;&lt;STRONG&gt;time-dependent&lt;/STRONG&gt;&lt;/U&gt; variable based on UNEMP variable, which takes into account the time dependency of Unemp. Then I am going to use that variable in Proc Phreg analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you indeed for your help. Below is a code for what I have.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data what_I_Have;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input CASE_ID Year&lt;SPAN&gt;_of_visit&amp;nbsp;&lt;/SPAN&gt;UNEMP HIV_Status ;&lt;/P&gt;&lt;P&gt;Datalines;&lt;/P&gt;&lt;P&gt;1 2000 0 0&lt;/P&gt;&lt;P&gt;1 2001 0 0&lt;/P&gt;&lt;P&gt;1 2002 1 0&lt;/P&gt;&lt;P&gt;1 2003 1 1&lt;/P&gt;&lt;P&gt;1 2004 0 1&lt;/P&gt;&lt;P&gt;2 2000 0 0&lt;/P&gt;&lt;P&gt;2 2001 0 1&lt;/P&gt;&lt;P&gt;2 2002 1 1&lt;/P&gt;&lt;P&gt;2 2003 1 1&lt;/P&gt;&lt;P&gt;2 2004 1 1&lt;/P&gt;&lt;P&gt;2 2005 1 1&lt;/P&gt;&lt;P&gt;3 2000 1 0&lt;/P&gt;&lt;P&gt;3 2001 1 0&lt;/P&gt;&lt;P&gt;4 2000 1 0&lt;/P&gt;&lt;P&gt;4 2001 0 0&lt;/P&gt;&lt;P&gt;5 2000 1 0&lt;/P&gt;&lt;P&gt;5 2001 1 0&lt;/P&gt;&lt;P&gt;5 2002 0 1&lt;/P&gt;&lt;P&gt;5 2003 1 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432260#M13390</guid>
      <dc:creator>Sinakian1</dc:creator>
      <dc:date>2018-01-30T15:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a time-dependent variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432278#M13394</link>
      <description>&lt;P&gt;Sorry, but i don't understand what "time-dependent" means. Please explain what the variable should contain.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432278#M13394</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-01-30T15:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a time-dependent variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432290#M13396</link>
      <description>I only have 5 participants (Case Ids 1 to 5). But, there are more than 5 observations because each participant answer's to the question "are you employed currently?" changed over time. I want to take this change into account when doing the Proc Phreg. Thank you</description>
      <pubDate>Tue, 30 Jan 2018 16:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-make-a-time-dependent-variable/m-p/432290#M13396</guid>
      <dc:creator>Sinakian1</dc:creator>
      <dc:date>2018-01-30T16:05:48Z</dc:date>
    </item>
  </channel>
</rss>

