<?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-varying covariates in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13865#M273</link>
    <description>In the MODEL statement, you have used cum as a variable.  Then you have used cum as an array in the ARRAY statement.  I think that you want to use ras (no subscript) in the model statement and then revers cum and ras in the IF statement.</description>
    <pubDate>Mon, 03 May 2010 13:01:00 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2010-05-03T13:01:00Z</dc:date>
    <item>
      <title>time-varying covariates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13863#M271</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to look at the effect of a drug on an outcome. The drug was used at different intervals through the observation period. I set up the data as below&lt;BR /&gt;
&lt;BR /&gt;
NODAT Duration RAS1 RAS2 RAS3 etc for use in months 1, 2, 3 etc&lt;BR /&gt;
&lt;BR /&gt;
and I used this syntax&lt;BR /&gt;
&lt;BR /&gt;
proc phreg data=_proj_.imported;&lt;BR /&gt;
model DURATION*NODAT(0) = cum AGE / risklimits;&lt;BR /&gt;
array cum (*) RAS1-RAS12;&lt;BR /&gt;
do i = 1 to 12;&lt;BR /&gt;
if DURATION=i then cum=RAS&lt;I&gt;; end; run;&lt;BR /&gt;
&lt;BR /&gt;
and keep getting this error&lt;BR /&gt;
ERROR: The name cum is already defined as a variable and cannot be redeclared as an array by the ARRAY statement&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help,&lt;/I&gt;</description>
      <pubDate>Sat, 01 May 2010 02:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13863#M271</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-01T02:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: time-varying covariates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13864#M272</link>
      <description>&amp;gt; Hello,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I am trying to look at the effect of a drug on an&lt;BR /&gt;
&amp;gt; outcome. The drug was used at different intervals&lt;BR /&gt;
&amp;gt; through the observation period. I set up the data as&lt;BR /&gt;
&amp;gt; below&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; NODAT Duration RAS1 RAS2 RAS3 etc for use in months&lt;BR /&gt;
&amp;gt; 1, 2, 3 etc&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; and I used this syntax&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; proc phreg data=_proj_.imported;&lt;BR /&gt;
&amp;gt; model DURATION*NODAT(0) = cum AGE / risklimits;&lt;BR /&gt;
&amp;gt; array cum (*) RAS1-RAS12;&lt;BR /&gt;
&amp;gt; do i = 1 to 12;&lt;BR /&gt;
&amp;gt; if DURATION=i then cum=RAS&lt;I&gt;; end; run;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; and keep getting this error&lt;BR /&gt;
&amp;gt; ERROR: The name cum is already defined as a variable&lt;BR /&gt;
&amp;gt; and cannot be redeclared as an array by the ARRAY&lt;BR /&gt;
&amp;gt; statement&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks so much for any help,&lt;BR /&gt;
&lt;BR /&gt;
I think it's in the last line.  You have cum = RAS&lt;I&gt;, shouldn't it be cum&lt;I&gt; = ras&lt;I&gt;&lt;BR /&gt;
&lt;BR /&gt;
?&lt;BR /&gt;
&lt;BR /&gt;
But what are you trying to do here?  It's not clear to me.&lt;BR /&gt;
&lt;BR /&gt;
Peter&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Mon, 03 May 2010 10:52:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13864#M272</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2010-05-03T10:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: time-varying covariates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13865#M273</link>
      <description>In the MODEL statement, you have used cum as a variable.  Then you have used cum as an array in the ARRAY statement.  I think that you want to use ras (no subscript) in the model statement and then revers cum and ras in the IF statement.</description>
      <pubDate>Mon, 03 May 2010 13:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/time-varying-covariates/m-p/13865#M273</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-05-03T13:01:00Z</dc:date>
    </item>
  </channel>
</rss>

