<?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 Model, Nested ANCOVA with Random Coefficients in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95625#M4767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may be misunderstanding your design because I think your random factor2 has the same levels across all levels of factor1, so is not truly nested, but you could try (syntax is for SAS/STAT12.1):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=yourdata;&lt;/P&gt;&lt;P&gt;class factor1 factor2 id;&lt;/P&gt;&lt;P&gt;model response = factor1 covariate factor1*covariate/solution ddfm=kr2;&lt;/P&gt;&lt;P&gt;random factor2/subject=id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Type 3 F tests are essentially for slopes and intercepts:&amp;nbsp; factor1*covariate tests whether the slopes differ for the levels of factor1, while factor1 tests whether the intercepts differ.&amp;nbsp; If you have access to SAS for Mixed Models, 2nd.ed. by Littell et al., check the sections on analysis of covariance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Dec 2012 13:42:38 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2012-12-11T13:42:38Z</dc:date>
    <item>
      <title>Mixed Model, Nested ANCOVA with Random Coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95624#M4766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: arial; font-size: small;"&gt;Suppose I have two factors, call them Factor1 and Factor2.&amp;nbsp; Factor1 is fixed with two levels, call them A and B.&amp;nbsp; Factor2 is random with three levels and is nested within Factor1.&amp;nbsp; For each level of factor2(factor1) my data set has about 100 observations, including a covariate and the continuous response variable.&amp;nbsp; Conceptually, a simple linear model exist for each level of factor2(factor1).&amp;nbsp; The levels of factor2(factor1) appear to have unequal slope and unequal intercept parameters.&amp;nbsp; First, I need to determine whether or not the average of the slope parameters for level A is significantly different from the average of the slope parameters for level B.&amp;nbsp; If there is no significant difference between the average slope parameters, then I would also like to test for significant differences between intercepts of the two levels.&amp;nbsp; Does anyone have any ideas on how to set up this problem, preferably with PROC MIXED? &lt;/P&gt;&lt;P style="color: #000000; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: arial; font-size: small;"&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 22:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95624#M4766</guid>
      <dc:creator>JeremyPoling</dc:creator>
      <dc:date>2012-12-10T22:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed Model, Nested ANCOVA with Random Coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95625#M4767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may be misunderstanding your design because I think your random factor2 has the same levels across all levels of factor1, so is not truly nested, but you could try (syntax is for SAS/STAT12.1):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=yourdata;&lt;/P&gt;&lt;P&gt;class factor1 factor2 id;&lt;/P&gt;&lt;P&gt;model response = factor1 covariate factor1*covariate/solution ddfm=kr2;&lt;/P&gt;&lt;P&gt;random factor2/subject=id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Type 3 F tests are essentially for slopes and intercepts:&amp;nbsp; factor1*covariate tests whether the slopes differ for the levels of factor1, while factor1 tests whether the intercepts differ.&amp;nbsp; If you have access to SAS for Mixed Models, 2nd.ed. by Littell et al., check the sections on analysis of covariance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 13:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95625#M4767</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-12-11T13:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed Model, Nested ANCOVA with Random Coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95626#M4768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for your helpful response.&amp;nbsp; You said that the syntax is for SAS/STAT 12.1.&amp;nbsp; Unfortunately, I'm still stuck in SAS 9.1.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The levels of factor2 are not the same for every level of factor1, so the design is nested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about the problem some more today and came up with the following PROC MIXED step that I think does the trick.&amp;nbsp; Using this model, there is both a fixed and a random component to the slopes and intercepts.&amp;nbsp; However, I've never seen a model quite like this and I'm operating a bit outside of my comfort zone.&amp;nbsp; Does what I'm doing make sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class factor1 factor2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model response=factor1 covariate*factor1/noint solution;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random factor2(factor1) covariate*factor2(factor1)/solution;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; estimate "Intercepts: Level A - Level B" factor1 1 -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; estimate "Slopes: Level A - Level B" covariate*factor1 1 -1;&lt;/P&gt;&lt;P&gt;quit; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 01:47:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95626#M4768</guid>
      <dc:creator>JeremyPoling</dc:creator>
      <dc:date>2012-12-12T01:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed Model, Nested ANCOVA with Random Coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95627#M4769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks right&amp;nbsp; To speed processing, etc., you may want to change the random statement to take advantage of subject specification:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;random intercept covariate/subject=factor2(factor1) solution;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 12:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95627#M4769</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-12-12T12:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed Model, Nested ANCOVA with Random Coefficients</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95628#M4770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much.&amp;nbsp; This has been a big help.&amp;nbsp; Your RANDOM statement did speed processing considerably.&amp;nbsp; I also added the TYPE=FA0(2) option to the RANDOM statement because I came across an example that recommended this covariance structure (or TYPE=UN) for random coefficient models.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 22:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-Model-Nested-ANCOVA-with-Random-Coefficients/m-p/95628#M4770</guid>
      <dc:creator>JeremyPoling</dc:creator>
      <dc:date>2012-12-12T22:18:08Z</dc:date>
    </item>
  </channel>
</rss>

