<?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: MIxed models fixed and random effects in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677354#M32514</link>
    <description>&lt;P&gt;This line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;random intercept/ Subject=ID TYPE=vc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;incorporates ID as a random effects factor and produces an estimate of the variance among IDs (random intercepts) assuming that IDs are independent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The general convention is to exclude "noint" from your MODEL statement, so that you have&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model R=Time Treatment Time*Treatment Pre;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I do not know why you have included "noint" here. If you are using it to get means for each treatment, it would be better to use the LSMEANS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not recommend the use of Tukey adjusted p-values for pairwise comparisons among interaction means for (at least) two reasons. One, the comparisons are adjusted for &lt;EM&gt;all&lt;/EM&gt; possible pairwise comparisons. You are not usually interested in all of them, so the results are too conservative (the adjusted p-values are too small). Two, pairwise comparisons among interaction means do not do a good job of assessing the nature of interaction: interaction is comparisons of pairwise comparisons. I think it is preferable to develop hypotheses that make sense in the context of the study and to test those hypotheses with contrasts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm guessing that Time is a repeated measure on each ID. Your current model assumes equal correlation among residuals regardless of how far apart in time they are (i.e., compound symmetry). You may be interested in exploring other covariance structures, such as AR(1), by using the REPEATED statement. &lt;A href="https://onlinelibrary.wiley.com/doi/10.1002/1097-0258(20000715)19:13%3C1793::AID-SIM482%3E3.0.CO;2-Q" target="_self"&gt;Modelling covariance structure in the analysis of repeated measures data&lt;/A&gt; by Littell et al. provides a nice discussion of different covariance structures and how to implement them in Proc MIXED. &lt;A href="https://www.amazon.com/SAS-Mixed-Models-Introduction-Applications/dp/163526135X" target="_self"&gt;SAS for Mixed Models: Introduction and Basic Applications&lt;/A&gt; by Stroup et al. is an invaluable resource for mixed models and their implementation in SAS software.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps move you forward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2020 21:24:15 GMT</pubDate>
    <dc:creator>sld</dc:creator>
    <dc:date>2020-08-17T21:24:15Z</dc:date>
    <item>
      <title>MIxed models fixed and random effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/675499#M32341</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am working on a project where I want to random my subject (ID in my case). I wonder which of the following code is doing a random effect for me? or are they both giving the ID a random effect?&lt;/P&gt;&lt;P class="p1"&gt;1 proc mixed data=WORK.IMPORT method=reml plots=(residualPanel studentPanel&lt;/P&gt;&lt;P class="p1"&gt;influenceStatPanel)alpha=0.05;&lt;/P&gt;&lt;P class="p1"&gt;class ID Treatment Time;&lt;/P&gt;&lt;P class="p1"&gt;model R=Time Treatment Time*Treatment/noint;&lt;/P&gt;&lt;P class="p1"&gt;repeated Time/ Subject=ID TYPE=unstructured;&lt;/P&gt;&lt;P class="p1"&gt;lsmeans Time*Treatment/adjust=tukey pdiff=all alpha=0.05 cl;&lt;/P&gt;&lt;P class="p1"&gt;run;&lt;/P&gt;&lt;P class="p1"&gt;2&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;proc mixed data=WORK.IMPORT method=reml plots=(residualPanel studentPanel&lt;/P&gt;&lt;P class="p1"&gt;influenceStatPanel)alpha=0.05;&lt;/P&gt;&lt;P class="p1"&gt;class ID Treatment Time;&lt;/P&gt;&lt;P class="p1"&gt;model R=Time Treatment Time*Treatment/noint;&lt;/P&gt;&lt;P class="p1"&gt;repeated Time/ type= cs Subject=ID TYPE=unstructured;&lt;/P&gt;&lt;P class="p1"&gt;lsmeans Time*Treatment/adjust=tukey pdiff=all alpha=0.05 cl;&lt;/P&gt;&lt;P class="p1"&gt;run;&lt;/P&gt;&lt;P&gt;Thank you so much&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 20:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/675499#M32341</guid>
      <dc:creator>Xi1</dc:creator>
      <dc:date>2020-08-09T20:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: MIxed models fixed and random effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/675533#M32355</link>
      <description>&lt;P&gt;The first model looks OK.&lt;/P&gt;
&lt;P&gt;The second model specifies &lt;EM&gt;type&lt;/EM&gt; twice in the REPEATED statement, and you can only have one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a general rule, you should always (with few exceptions) include an intercept in a MODEL statement such as the one you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 04:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/675533#M32355</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2020-08-10T04:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: MIxed models fixed and random effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677123#M32492</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you so much for your invaluable common. I fixed my code into this one.&lt;/P&gt;&lt;P&gt;proc mixed data=WORK.IMPORT covtest noclprint method=reml plots=(residualPanel studentPanel&lt;BR /&gt;influenceStatPanel)alpha=0.05;&lt;BR /&gt;class ID Treatment Time;&lt;BR /&gt;model R=Time Treatment Time*Treatment Pre/noint;&lt;BR /&gt;random intercept/ Subject=ID TYPE=vc;&lt;BR /&gt;lsmeans Time*Treatment/adjust=tukey pdiff=all alpha=0.05 cl;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Does this one seems correct to you? is there a random effect on ID?&lt;/P&gt;&lt;P&gt;Deeply appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 00:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677123#M32492</guid>
      <dc:creator>Xi1</dc:creator>
      <dc:date>2020-08-17T00:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: MIxed models fixed and random effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677354#M32514</link>
      <description>&lt;P&gt;This line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;random intercept/ Subject=ID TYPE=vc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;incorporates ID as a random effects factor and produces an estimate of the variance among IDs (random intercepts) assuming that IDs are independent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The general convention is to exclude "noint" from your MODEL statement, so that you have&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model R=Time Treatment Time*Treatment Pre;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I do not know why you have included "noint" here. If you are using it to get means for each treatment, it would be better to use the LSMEANS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not recommend the use of Tukey adjusted p-values for pairwise comparisons among interaction means for (at least) two reasons. One, the comparisons are adjusted for &lt;EM&gt;all&lt;/EM&gt; possible pairwise comparisons. You are not usually interested in all of them, so the results are too conservative (the adjusted p-values are too small). Two, pairwise comparisons among interaction means do not do a good job of assessing the nature of interaction: interaction is comparisons of pairwise comparisons. I think it is preferable to develop hypotheses that make sense in the context of the study and to test those hypotheses with contrasts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm guessing that Time is a repeated measure on each ID. Your current model assumes equal correlation among residuals regardless of how far apart in time they are (i.e., compound symmetry). You may be interested in exploring other covariance structures, such as AR(1), by using the REPEATED statement. &lt;A href="https://onlinelibrary.wiley.com/doi/10.1002/1097-0258(20000715)19:13%3C1793::AID-SIM482%3E3.0.CO;2-Q" target="_self"&gt;Modelling covariance structure in the analysis of repeated measures data&lt;/A&gt; by Littell et al. provides a nice discussion of different covariance structures and how to implement them in Proc MIXED. &lt;A href="https://www.amazon.com/SAS-Mixed-Models-Introduction-Applications/dp/163526135X" target="_self"&gt;SAS for Mixed Models: Introduction and Basic Applications&lt;/A&gt; by Stroup et al. is an invaluable resource for mixed models and their implementation in SAS software.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps move you forward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 21:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677354#M32514</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2020-08-17T21:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: MIxed models fixed and random effects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677356#M32515</link>
      <description>Thank you so much for your help.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2020 21:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIxed-models-fixed-and-random-effects/m-p/677356#M32515</guid>
      <dc:creator>Xi1</dc:creator>
      <dc:date>2020-08-17T21:40:05Z</dc:date>
    </item>
  </channel>
</rss>

