<?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 model time as a continuous variable in pre-post longitudinal data in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615813#M29696</link>
    <description>&lt;P&gt;I don't know the "best" way to model your data, but if you put TIME on the CLASS statement, the procedure will treat it as a categorical variable with the levels in the data. That likely means that the CLASS levels are not two, but are many.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_mixed_examples02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;See the MIXED doc for an example of continuous time&lt;/A&gt;.&amp;nbsp;You can try removing that variable from the CLASS and REPEATED statements and see if the results make sense for your data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;	&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;mixed&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;data_long&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
			&lt;SPAN class="token statement"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;id&lt;/SPAN&gt; sex &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
			&lt;SPAN class="token procnames"&gt;model&lt;/SPAN&gt; Y &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;time&lt;/SPAN&gt; sex bmi &lt;SPAN class="token function"&gt;time&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;bmi&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
			repeated &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; type &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; un sub&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;id&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
	&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2020 21:46:09 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2020-01-07T21:46:09Z</dc:date>
    <item>
      <title>How to model time as a continuous variable in pre-post longitudinal data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615768#M29695</link>
      <description>&lt;P&gt;I have a research question where I wanted to investigate factors predicting a change in a severity score of a lung health indicator (let's call it Y). I have two measurements which are unequally spaced, with subjects having an average follow-up 7.7 years; but some subjects have a follow-up period of 5 years and others close 9 years. I have covariates that are 'fixed' (e.g. sex, race) and others that are collected at each of the two time points (e.g. bmi).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question is: how can I best model the outcome of interest Y?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I am correct, I don't think I should worry about the co-variance structure in the model or 'random' time effects since I only have two time points. However, I think it is important to take into account that not all subjects have the same follow-up time (and perhaps treat time as continuous?).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following with SAS code, but here I treated time as a categorical variable (0/1) -- which I believe is not correct since not everyone has the same follow-up time.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	proc mixed data=data_long;
			class id sex time; 
			model Y = time sex bmi time*bmi; 
			repeated time / type = un sub=id; 
			*lsmeans time*bmi;
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 20:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615768#M29695</guid>
      <dc:creator>guaguncher</dc:creator>
      <dc:date>2020-01-07T20:25:28Z</dc:date>
    </item>
    <item>
      <title>How can I model two data points longitudinally?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615786#M29697</link>
      <description>&lt;P&gt;I have a research question where I wanted to investigate factors predicting a change in a severity score of a lung health indicator (let's call it Y). I have two measurements which are unequally spaced, with subjects having an average follow-up 7.7 years; but some subjects have a follow-up period of 5 years and others close 9 years. I have covariates that are 'fixed' (e.g. sex, race) and others that are collected at each of the two time points (e.g. bmi).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question is: how can I best model the outcome of interest Y?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I am correct, I don't think I should worry about the co-variance structure in the model or 'random' time effects since I only have two time points. However, I think it is important to take into account that not all subjects have the same follow-up time (and perhaps treat time as continuous?).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following with SAS code, but here I treated time as a categorical variable (0/1) -- which I believe is not correct since not everyone has the same follow-up time.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	proc mixed data=data_long;
			class id sex time; 
			model Y = time sex bmi time*bmi; 
			repeated time / type = un sub=id; 
			*lsmeans time*bmi;
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 20:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615786#M29697</guid>
      <dc:creator>guaguncher</dc:creator>
      <dc:date>2020-01-07T20:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to model time as a continuous variable in pre-post longitudinal data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615813#M29696</link>
      <description>&lt;P&gt;I don't know the "best" way to model your data, but if you put TIME on the CLASS statement, the procedure will treat it as a categorical variable with the levels in the data. That likely means that the CLASS levels are not two, but are many.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_mixed_examples02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;See the MIXED doc for an example of continuous time&lt;/A&gt;.&amp;nbsp;You can try removing that variable from the CLASS and REPEATED statements and see if the results make sense for your data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;	&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;mixed&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;data_long&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
			&lt;SPAN class="token statement"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;id&lt;/SPAN&gt; sex &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
			&lt;SPAN class="token procnames"&gt;model&lt;/SPAN&gt; Y &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;time&lt;/SPAN&gt; sex bmi &lt;SPAN class="token function"&gt;time&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;bmi&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
			repeated &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; type &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; un sub&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;id&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
	&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 21:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-model-time-as-a-continuous-variable-in-pre-post/m-p/615813#M29696</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-01-07T21:46:09Z</dc:date>
    </item>
  </channel>
</rss>

