<?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: Need help on proc mixed? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450517#M23568</link>
    <description>&lt;P&gt;This is my vision of your experimental design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want to assess whether there are differences in mean response among 4 specifically-chosen methods on 3 specifically-chosen farms. Both method and farm are fixed effects factors. The experimental unit for the farm factor is a house (although clearly levels of farm cannot be randomly assigned to houses); house is a random effects factor. Repeated measures on a house (of which there are 4) are randomly assigned to method; these repeated measures units&amp;nbsp;comprise a random effects factor. Essentially, this is a two-way factorial in a split-plot design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, given all this, I suggest this model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*  Fit split-plot model */
proc glimmix data= duckstudyMethodEffect2
    plots=(studentpanel boxplot(fixed student));
    class house farm method;
    model wing = farm method farm*method;
    random intercept / subject=house(farm);
    lsmeans farm method / diff adjust=simulate(seed=12345);
    lsmeans farm*method / plot=meanplot(sliceby=method join cl);
    run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;BUT!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know what each method measures, and looking at the data you provided, I can see that the scale of measurement is very different for each method (for example, DE is always an integer and the other methods are not). I suspect you are trying to compare apples and oranges here, which is an activity of little value. The measurements for the different methods&amp;nbsp;must have a common scale; otherwise they cannot be sensibly compared.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have additional issues with these data. You do not have data for all methods in all houses. You have a lot of zero values. You have values that appear unusual relative to the other values (i.e., potential outliers). And you have the minimal level of replication (n=2 houses) so your ability to assess distributional assumptions is very limited.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These analyses will be challenging. But the first challenge is to determine whether the measurement scales for the different methods are actually comparable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 04:27:48 GMT</pubDate>
    <dc:creator>sld</dc:creator>
    <dc:date>2018-04-03T04:27:48Z</dc:date>
    <item>
      <title>Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450414#M23555</link>
      <description>&lt;P&gt;Dear All, I am using this Proc Mixed code but I got these errors&lt;/P&gt;&lt;P&gt;WARNING: The R matrix depends on observation order within subjects. Omitting observations from&lt;BR /&gt;the analysis because of missing values can affect this matrix. Consider using a&lt;BR /&gt;classification effect in the REPEATED statement to determine ordering in the R matrix.&lt;BR /&gt;NOTE: 3 observations are not included because of missing values.&lt;BR /&gt;WARNING: Stopped because of infinite likelihood.&lt;BR /&gt;NOTE: PROCEDURE MIXED used (Total process time):&lt;BR /&gt;real time 0.11 seconds&lt;BR /&gt;cpu time 0.06 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code that I am using&lt;/P&gt;&lt;P&gt;&amp;nbsp;Data duckstudyMethodEffect2;&lt;BR /&gt;input Farm House Method$ E2 N2 Wing Back UW Blood Lethergic Dead ;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 CAI 0.000 9.667 20.333 6.333 10.333 15.667 0.000 .&lt;BR /&gt;1 2 CAI 0.000 2.333 26.000 13.333 9.333 21.667 0.000 .&lt;BR /&gt;2 3 CAI . . . . . . . .&lt;BR /&gt;2 4 CAI 0.000 0.000 16.000 2.000 20.000 27.333 16.000 .&lt;BR /&gt;3 5 CAI 0.000 1.667 24.667 9.667 29.667 38.667 0.000 .&lt;BR /&gt;3 6 CAI 0.000 8.667 23.667 8.667 25.000 19.000 0.000 .&lt;BR /&gt;1 1 TW 0.388 0.886 12.590 5.672 3.136 4.031 0.194 0.000&lt;BR /&gt;1 2 TW 0.000 0.103 3.139 1.092 0.800 1.557 0.000 0.069&lt;BR /&gt;2 3 TW . . . . . . . .&lt;BR /&gt;2 4 TW 0.000 1.053 1.907 0.257 1.501 2.438 0.000 0.017&lt;BR /&gt;3 5 TW 0.009 0.009 2.742 1.755 9.066 10.197 0.009 0.118&lt;BR /&gt;3 6 TW 0.000 0.000 2.105 1.661 6.376 4.341 0.000 0.000&lt;BR /&gt;1 1 DE . . . . . . . .&lt;BR /&gt;1 2 DE 0.000 1.000 7.000 1.000 1.000 2.000 0.000 0.000&lt;BR /&gt;2 3 DE 0.000 6.000 8.000 0.000 0.000 14.000 0.000 0.000&lt;BR /&gt;2 4 DE 0.000 5.000 4.000 0.000 8.000 3.000 1.000 0.000&lt;BR /&gt;3 5 DE 0.000 0.000 12.000 2.000 34.000 34.000 0.000 0.000&lt;BR /&gt;3 6 DE 0.000 0.000 4.000 6.000 32.000 22.000 0.000 0.000&lt;BR /&gt;1 1 LO 0.063 0.063 4.452 1.230 1.040 1.722 0.000 0.000&lt;BR /&gt;1 2 LO 0.000 0.035 4.471 1.802 1.014 1.369 0.000 0.139&lt;BR /&gt;2 3 LO 0.000 1.596 1.373 0.711 0.480 3.391 0.017 0.000&lt;BR /&gt;2 4 LO 0.000 1.493 2.371 0.439 1.318 4.950 0.000 0.033&lt;BR /&gt;3 5 LO 0.000 0.000 2.333 0.691 11.691 10.760 0.000 0.018&lt;BR /&gt;3 6 LO 0.000 0.000 2.444 1.479 8.907 6.550 0.000 0.000&lt;BR /&gt;;&lt;BR /&gt;Proc univariate plot normal;&lt;BR /&gt;Var Wing;&lt;BR /&gt;proc sort; by Method;&lt;BR /&gt;proc means; by Method;&lt;BR /&gt;proc mixed;&lt;BR /&gt;class Farm House Method;&lt;BR /&gt;Model Wing= House Method House*Method ;&lt;BR /&gt;repeated / subject=House type=cs;&lt;BR /&gt;parms / ols;&lt;BR /&gt;lsmeans House Method House*Method /adjust=tukey; ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;You help is appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 17:32:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450414#M23555</guid>
      <dc:creator>essam</dc:creator>
      <dc:date>2018-04-02T17:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450448#M23559</link>
      <description>&lt;P&gt;I'm sure that your model is not correctly specified, but you have not provided enough information for anyone to suggest an alternative.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the roles in your study for Farm, House, and Method? Is each factor a fixed or a random effect? Are any factors nested within any other factors? What is the repeated measure factor, and what design unit is it measured on multiple times? In other words, describe your experimental design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 19:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450448#M23559</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-04-02T19:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450449#M23560</link>
      <description>&lt;P&gt;Thank you for the reply!&lt;/P&gt;&lt;P&gt;We measured some welfare indicators for birds in each farm (total 3 farms). Each farm consisted of 2 houses so we had total 6 houses for the experiment.&lt;/P&gt;&lt;P&gt;I considered:&lt;/P&gt;&lt;P&gt;Farm&amp;nbsp;as random factor&lt;/P&gt;&lt;P&gt;House as repeated factor&lt;/P&gt;&lt;P&gt;Method&amp;nbsp;as fixed factor (we tested 4 different methods)&lt;/P&gt;&lt;P&gt;I need to know the effect of method, house, and interaction between&amp;nbsp;them on the welfare indicators.&lt;/P&gt;&lt;P&gt;I wish I clarified what I need?&lt;/P&gt;&lt;P&gt;Thanks for offering help!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 19:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450449#M23560</guid>
      <dc:creator>essam</dc:creator>
      <dc:date>2018-04-02T19:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450456#M23561</link>
      <description>&lt;P&gt;Were the two houses at each farm assigned to some sort of treatment (for example, light cycle)? In other words, what do the two houses represent in your study? Does the level of house (1 or 2, 3 or 4, 5 or 6) affect the &lt;EM&gt;mean&lt;/EM&gt; of the response or the &lt;EM&gt;variance&lt;/EM&gt; of the response.&amp;nbsp;&lt;SPAN&gt;Are you &lt;EM&gt;specifically&lt;/EM&gt; interested in these 6 houses, or are they meant to represent "houses" &lt;EM&gt;in general&lt;/EM&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does the level of&amp;nbsp;farm (1 or 2 or 3) affect the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;mean&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;of the response or the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;variance&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;of the response? Are you specifically interested in these 3 farms, or are they meant to represent "farms" in general?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I recommend this paper if you are unfamiliar with figuring out what factors are random and what factors are fixed&amp;nbsp;&lt;A href="https://esajournals.onlinelibrary.wiley.com/doi/abs/10.2307/1941729" target="_self"&gt;Use and Misuse of Mixed Model Analysis of Variance in Ecological Studies&lt;/A&gt;&amp;nbsp;It's biologically friendly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Were there groups of birds within each house, where each group of birds was assigned to a different method? If so, were the methods assigned at the same time, or in sequence? How many birds were in each group? Were different birds assigned to different groups?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 20:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450456#M23561</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-04-02T20:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450466#M23562</link>
      <description>&lt;P&gt;I meant to represent houses that used in the study so I give them numbers from 1 to 6 and the level of the house&amp;nbsp;does not affect the mean of response. Also for farms, I meant to represent each farm. Each&amp;nbsp;house contained about 6000 birds so we visited each house in separate days when birds aged 30 days and we assessed the welfare of birds by using 4 different assessment methods (fixed factors). All of the 4 methods applied in the random order on the same day per house. I need to know how the method of assessment affects the incidence of measured welfare indicators.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for sharing the paper!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 21:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450466#M23562</guid>
      <dc:creator>essam</dc:creator>
      <dc:date>2018-04-02T21:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450490#M23565</link>
      <description>&lt;P&gt;So I would say that house is a random effects factor, and that method is a fixed effects factor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more question about farm: are you interested in just these 3 farms, where the level of farm determines the mean of the response rather than the variance? If so, then house is the experimental unit for the fixed effect of farm.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 23:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450490#M23565</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-04-02T23:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450495#M23567</link>
      <description>&lt;P&gt;That is right the house is the experimental unit for the fixed effect of the farm. So how is the code will looks like?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 23:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450495#M23567</guid>
      <dc:creator>essam</dc:creator>
      <dc:date>2018-04-02T23:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on proc mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450517#M23568</link>
      <description>&lt;P&gt;This is my vision of your experimental design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want to assess whether there are differences in mean response among 4 specifically-chosen methods on 3 specifically-chosen farms. Both method and farm are fixed effects factors. The experimental unit for the farm factor is a house (although clearly levels of farm cannot be randomly assigned to houses); house is a random effects factor. Repeated measures on a house (of which there are 4) are randomly assigned to method; these repeated measures units&amp;nbsp;comprise a random effects factor. Essentially, this is a two-way factorial in a split-plot design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, given all this, I suggest this model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*  Fit split-plot model */
proc glimmix data= duckstudyMethodEffect2
    plots=(studentpanel boxplot(fixed student));
    class house farm method;
    model wing = farm method farm*method;
    random intercept / subject=house(farm);
    lsmeans farm method / diff adjust=simulate(seed=12345);
    lsmeans farm*method / plot=meanplot(sliceby=method join cl);
    run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;BUT!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know what each method measures, and looking at the data you provided, I can see that the scale of measurement is very different for each method (for example, DE is always an integer and the other methods are not). I suspect you are trying to compare apples and oranges here, which is an activity of little value. The measurements for the different methods&amp;nbsp;must have a common scale; otherwise they cannot be sensibly compared.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have additional issues with these data. You do not have data for all methods in all houses. You have a lot of zero values. You have values that appear unusual relative to the other values (i.e., potential outliers). And you have the minimal level of replication (n=2 houses) so your ability to assess distributional assumptions is very limited.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These analyses will be challenging. But the first challenge is to determine whether the measurement scales for the different methods are actually comparable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 04:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-on-proc-mixed/m-p/450517#M23568</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-04-03T04:27:48Z</dc:date>
    </item>
  </channel>
</rss>

