<?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 GENMOD: Using to model longitudinal data with a continuous outcome in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562876#M27803</link>
    <description>&lt;P&gt;Dear SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am reposting my question from programming, that was moved to procedures and then recommended that it be posted here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fitting a couple of generalized linear regression model with continuous outcomes: BUA, SOS, SI. The independent predictors are both categorical and continuous and my data is in long form. I would like to use PROC GENMOD for this, but I'm not sure if my code is calling the correct type of model. Do I need to include a repeated statement for the visit variable and how do I code the statement to make sure that it recognizes that ID X is repeated at VISIT X?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outcome=SOS (continuous)&lt;/P&gt;&lt;P&gt;Predictor=Group (dichotomous)&lt;/P&gt;&lt;P&gt;Time Variable=Visit (1,2,3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my orginal code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=qus;
	class group (ref="2") / param=ref;
	class id;
	model sos = group  visit  / dist=normal link=identity;
	run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It was suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;that I use a repeated statement and code it as follows, but to also post it here and make sure this is a good way to model it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=qus;
	class group (ref="2") / param=ref;
	class id;
	model sos = group  / dist=normal link=identity;
repeated subject=id / within=visit;
	run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Adding this statement doesn't have a tremendous effect on my model output. Have I accounted for these variables correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Cara&lt;/P&gt;</description>
    <pubDate>Fri, 31 May 2019 15:03:08 GMT</pubDate>
    <dc:creator>cbt2119</dc:creator>
    <dc:date>2019-05-31T15:03:08Z</dc:date>
    <item>
      <title>GENMOD: Using to model longitudinal data with a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562876#M27803</link>
      <description>&lt;P&gt;Dear SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am reposting my question from programming, that was moved to procedures and then recommended that it be posted here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fitting a couple of generalized linear regression model with continuous outcomes: BUA, SOS, SI. The independent predictors are both categorical and continuous and my data is in long form. I would like to use PROC GENMOD for this, but I'm not sure if my code is calling the correct type of model. Do I need to include a repeated statement for the visit variable and how do I code the statement to make sure that it recognizes that ID X is repeated at VISIT X?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outcome=SOS (continuous)&lt;/P&gt;&lt;P&gt;Predictor=Group (dichotomous)&lt;/P&gt;&lt;P&gt;Time Variable=Visit (1,2,3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my orginal code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=qus;
	class group (ref="2") / param=ref;
	class id;
	model sos = group  visit  / dist=normal link=identity;
	run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It was suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;that I use a repeated statement and code it as follows, but to also post it here and make sure this is a good way to model it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=qus;
	class group (ref="2") / param=ref;
	class id;
	model sos = group  / dist=normal link=identity;
repeated subject=id / within=visit;
	run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Adding this statement doesn't have a tremendous effect on my model output. Have I accounted for these variables correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Cara&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 15:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562876#M27803</guid>
      <dc:creator>cbt2119</dc:creator>
      <dc:date>2019-05-31T15:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: GENMOD: Using to model longitudinal data with a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562883#M27804</link>
      <description>&lt;P&gt;I think proc mixed would work better for a repeated measurement setup with continuous outcome:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=have;&lt;BR /&gt;class visit id treatment;&lt;BR /&gt;model outcome = treatment visit treatment*visit / noint solution;&lt;BR /&gt;repeated / SUBJECT=id TYPE=UN;&lt;BR /&gt;lsmeans vist / cl pdiff;&lt;BR /&gt;run;&lt;BR /&gt;quit;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 15:18:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562883#M27804</guid>
      <dc:creator>greveam</dc:creator>
      <dc:date>2019-05-31T15:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: GENMOD: Using to model longitudinal data with a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562913#M27806</link>
      <description>&lt;P&gt;That code is fine except you need to have VISIT in the CLASS statement if you are going to use it in the WITHIN= option. If you like, you can include both VISIT and the interaction with GROUP in your model if you want to see if those are significant effects on the response. Note that you can put several variables in one CLASS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=qus;
	class id group (ref="2") visit (ref="1") / param=ref;
	model sos = group  visit group*visit / dist=normal link=identity;
        repeated subject=id / within=visit;
	run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you might want to consider your response variable, SOS, and whether the normal distribution is appropriate. The normal is fine if you expect it to be reasonably symmetric about its mean in each group-visit combination. But if it is skewed, as could happen if it's positively valued with low mean, then other distributions like gamma or inverse gaussian might be better. Also, if you could consider other correlation structures for the measurements within subjects. The simple exchangeable structure (all measurements have the same, non-zero correlation) or the autoregressive structures are often used - TYPE=EXCH or TYPE=AR option in the REPEATED statement.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 17:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562913#M27806</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-05-31T17:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: GENMOD: Using to model longitudinal data with a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562921#M27807</link>
      <description>&lt;P&gt;Thanks! I will check this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cara&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 17:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GENMOD-Using-to-model-longitudinal-data-with-a-continuous/m-p/562921#M27807</guid>
      <dc:creator>cbt2119</dc:creator>
      <dc:date>2019-05-31T17:09:12Z</dc:date>
    </item>
  </channel>
</rss>

