<?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: PROC mixed level 2 variables as level 1? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938806#M46847</link>
    <description>&lt;P&gt;Hey, that worked!&amp;nbsp; *furiously reads notes on ddfm=bw*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay I'm not sure why this isn't the default but at least it makes sense why I haven't had this problem before because I am usually doing models with the repeated statement where it is the default. This all at least makes sense now, I really started questioning everything I knew about multi-level models. Thank you for your guidance!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2024 16:54:21 GMT</pubDate>
    <dc:creator>RyanDHS</dc:creator>
    <dc:date>2024-08-09T16:54:21Z</dc:date>
    <item>
      <title>PROC mixed level 2 variables as level 1?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938683#M46839</link>
      <description>&lt;P&gt;Moved from Programming board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data at the level of US Counties (level 1) nested within their respective State (level 2) and I have both predictors at the county level and the state level. My understanding was always that Proc Mixed determines the level of the variable in the model based on whether there is variability at each level. In this example, I have the population of the county (pop10) as a predictor and the way the state votes relative to others (CPVI), both ratio scales. My syntax is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data = sor covtest ;&lt;BR /&gt;class STATE ;&lt;BR /&gt;model SORgc = pop10 CPVI /s DDFM=sat ;&lt;BR /&gt;random int / sub=STATE ;&lt;BR /&gt;ods output SolutionR = Res2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ODS output gives me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Output 'SolutionR' was not created. Make sure that the output object name, label, or&lt;BR /&gt;path is spelled correctly. Also, verify that the appropriate procedure options are used&lt;BR /&gt;to produce the requested output object. For example, verify that the NOPRINT option is&lt;BR /&gt;not used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;because there are no level 2 residuals and the degrees of freedom suggest it is treating my level 2 variable CVPI as a level 1 predictor. I've attached the data file. I've checked that there is no variance in the variables at the state level (see second tab in excel sheet) and made sure everything is a number and everything I can possibly think of. SAS is doing the grouping right because it shows the number of subjects correctly (not all states are included).&amp;nbsp; Am I missing something really obvious? The degrees of freedom for a level 2 predictor should be less than the number of level 2 groups, right? I'm not going insane?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanDHS_0-1723135775970.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99114i3747B087E5E163A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanDHS_0-1723135775970.png" alt="RyanDHS_0-1723135775970.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanDHS_1-1723135775928.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99113i2F9C03CC3F2F034C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanDHS_1-1723135775928.png" alt="RyanDHS_1-1723135775928.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 16:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938683#M46839</guid>
      <dc:creator>RyanDHS</dc:creator>
      <dc:date>2024-08-08T16:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC mixed level 2 variables as level 1?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938684#M46840</link>
      <description>&lt;P&gt;You need to add the SOLUTION (or S) option in the RANDOM statement in order to obtain the SolutionR ODS table.&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 17:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938684#M46840</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-08-08T17:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC mixed level 2 variables as level 1?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938685#M46841</link>
      <description>&lt;P&gt;Yes, that was rather silly of me.&amp;nbsp; I still don't appear to be getting the correct degrees of freedom for my level 2 effect.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 17:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938685#M46841</guid>
      <dc:creator>RyanDHS</dc:creator>
      <dc:date>2024-08-08T17:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC mixed level 2 variables as level 1?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938687#M46842</link>
      <description>Am I correct in concluding that the Den Degrees of Freedom being the same for what should be level 1 and level 2 variables implies that both are being treated as level 1?</description>
      <pubDate>Thu, 08 Aug 2024 17:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938687#M46842</guid>
      <dc:creator>RyanDHS</dc:creator>
      <dc:date>2024-08-08T17:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC mixed level 2 variables as level 1?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938804#M46845</link>
      <description>&lt;P&gt;What happens if you specify ddfm=bw in the MODEL statement?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 15:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938804#M46845</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-08-09T15:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC mixed level 2 variables as level 1?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938806#M46847</link>
      <description>&lt;P&gt;Hey, that worked!&amp;nbsp; *furiously reads notes on ddfm=bw*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay I'm not sure why this isn't the default but at least it makes sense why I haven't had this problem before because I am usually doing models with the repeated statement where it is the default. This all at least makes sense now, I really started questioning everything I knew about multi-level models. Thank you for your guidance!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 16:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-mixed-level-2-variables-as-level-1/m-p/938806#M46847</guid>
      <dc:creator>RyanDHS</dc:creator>
      <dc:date>2024-08-09T16:54:21Z</dc:date>
    </item>
  </channel>
</rss>

