<?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: Degrees of freedom in proc Mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471480#M24556</link>
    <description>&lt;P&gt;Thanks Sld&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I changed that herd variable from fixed effect to the random effect and the cow_id removed from the model, the reason was because of the memory not enough to figure that out&amp;nbsp; and it giving a warning with error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my data I have more than 5000 herds and more than one million cows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for these information&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2018 18:36:46 GMT</pubDate>
    <dc:creator>Barkamih</dc:creator>
    <dc:date>2018-06-19T18:36:46Z</dc:date>
    <item>
      <title>Degrees of freedom in proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471162#M24531</link>
      <description>&lt;P&gt;&amp;nbsp;Hi All&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using proc mixed for my dataset today, and everything&amp;nbsp;was fine except degrees of freedom of tow variables were wrong, I don't know where was my mistake, and I got this error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Class levels for herd are not printed because of excessive size.&lt;BR /&gt;WARNING: Class levels for COW_ID are not printed because of excessive size.&lt;BR /&gt;ERROR: Integer overflow on computing amount of memory required. A request to allocate the memory&lt;BR /&gt;cannot be honored.&lt;BR /&gt;ERROR: The SAS System stopped processing this step because of insufficient memory.&lt;BR /&gt;NOTE: PROCEDURE MIXED used (Total process time):&lt;BR /&gt;real time 41.95 seconds&lt;BR /&gt;cpu time 12.93 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;this error caused by code 2. Code 1 was good but degrees of freedoms&amp;nbsp;were 1 for both (herd&amp;nbsp;and cow_id) variables. but infact&amp;nbsp;the number of cow_id and herd are more than a thousand!!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is my codes&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;code 1 

proc sort data = fatd;
by time; run;
PROC MIXED DATA = fatd;
class pr CAMONTH CALVING_EASE ;
model A = HERD COW_ID PR CALVING_EASE CAMONTH CAYEAR / S ;
LSMEANS PR CAMONTH ;
RUN;


code 2 
proc sort data = fatd;
by time; run;
PROC MIXED DATA = fatd;
class pr CAMONTH CALVING_EASE  HERD COW_ID ;
model A = HERD COW_ID PR CALVING_EASE CAMONTH CAYEAR / S ;
LSMEANS PR CAMONTH  HERD COW_ID ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;thses results pf degrees of freedom from code 1, code 2 gaving error !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;1&amp;nbsp; for herd&amp;nbsp; &amp;nbsp;and suppose to be more than 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; for cow_id also suppose to be more than 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;3&amp;nbsp; for camonth&lt;/P&gt;&lt;P&gt;2&amp;nbsp; for calving_ease&lt;/P&gt;&lt;P&gt;3 for pr&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 for cayear&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;these are the fd of my data&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 17:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471162#M24531</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-06-18T17:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Degrees of freedom in proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471286#M24549</link>
      <description>&lt;P&gt;I imagine that cows are nested within herds, and I also imagine that herds and cows might be random effects factors rather than fixed effects factors. If you would like more input from the Community, please provide a more detailed description of your study, including the definitions of your factors and your research questions. An example of your data set would also be helpful; if you don't want to share the actual data, you can replace A values with something nonsensical.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How many different&amp;nbsp;HERDs do you have? How many different COW_IDs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I notice that you are sorting by time, but time is not included in your model. Is that your intent?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may also have repeated measures on each cow, but again we would need more detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend that you study&amp;nbsp;&lt;A href="https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/prodBK_59882_en.html" target="_self"&gt;SAS® for Mixed Models, Second Edition&lt;/A&gt;, it is an excellent resource.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 03:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471286#M24549</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-19T03:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Degrees of freedom in proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471480#M24556</link>
      <description>&lt;P&gt;Thanks Sld&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I changed that herd variable from fixed effect to the random effect and the cow_id removed from the model, the reason was because of the memory not enough to figure that out&amp;nbsp; and it giving a warning with error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my data I have more than 5000 herds and more than one million cows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for these information&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 18:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471480#M24556</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-06-19T18:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Degrees of freedom in proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471508#M24561</link>
      <description>&lt;P&gt;You might be able to use the HPMIXED procedure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_hpmixed_sect002.htm" target="_self"&gt;The HPMIXED Procedure&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's designed for large linear mixed model problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 20:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degrees-of-freedom-in-proc-Mixed/m-p/471508#M24561</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-19T20:05:50Z</dc:date>
    </item>
  </channel>
</rss>

