<?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 What is the proper way to define random variable in GLIMMIX? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697278#M33636</link>
    <description>&lt;P&gt;Hi -I'm a biologist and am trying to improve my statistical skills and understanding.&amp;nbsp; And I am brand new to this forum.&amp;nbsp; I have what I'm sure is a fairly basic question, but I want to be sure I am setting up my model correctly in GLIMMIX. I am interested in assessing how a drug treatment impacts the immune response in zebrafish larvae, so my comparison of interest is drug vs no drug.&lt;/P&gt;&lt;P&gt;The experimental design is quite simple.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The larvae are either treated or not treated with a drug and 24 hours later the area occupied by a particular immune cell type is measured.&amp;nbsp; This experiment repeated 3 times in its entirety, on different days with completely different larvae. So the experimental days are independent.&amp;nbsp; There are NO repeated measures.&lt;/P&gt;&lt;P&gt;I want to account for the random effect of experimental day and have considered 2 ways of including it and am wondering which way is best.&amp;nbsp; I would also appreciate any explanation of why one way is better than the other in which circumstances so that I can improve my understanding.&amp;nbsp; These are the two codes that I have been working with for this experiment.&amp;nbsp; I am using SAS 9.3.&lt;/P&gt;&lt;P&gt;1) Experimental day ("exptday") alone as the random variable, with "treat" as the independent variable and "area" as the dependent variable:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix plots=ResidualPanel; 
class exptday treat;
model area = treat;
random  exptday;
lsmeans treat / pdiff cl;
output out=out1 pred=p resid=r;
title 'Analysis of area by treatment';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2) Experimental day also included as an "interaction" with treatment&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix plots=ResidualPanel; 
class exptday treat;
model area = treat;
random  exptday exptday*treat;
lsmeans treat / pdiff cl;
output out=out1 pred=p resid=r;
title 'Analysis of area by treatment';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any assistance or feedback would be appreciated as I am eager to learn!&amp;nbsp; Thank you.&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2020 00:30:00 GMT</pubDate>
    <dc:creator>jsquirre</dc:creator>
    <dc:date>2020-11-07T00:30:00Z</dc:date>
    <item>
      <title>What is the proper way to define random variable in GLIMMIX?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697278#M33636</link>
      <description>&lt;P&gt;Hi -I'm a biologist and am trying to improve my statistical skills and understanding.&amp;nbsp; And I am brand new to this forum.&amp;nbsp; I have what I'm sure is a fairly basic question, but I want to be sure I am setting up my model correctly in GLIMMIX. I am interested in assessing how a drug treatment impacts the immune response in zebrafish larvae, so my comparison of interest is drug vs no drug.&lt;/P&gt;&lt;P&gt;The experimental design is quite simple.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The larvae are either treated or not treated with a drug and 24 hours later the area occupied by a particular immune cell type is measured.&amp;nbsp; This experiment repeated 3 times in its entirety, on different days with completely different larvae. So the experimental days are independent.&amp;nbsp; There are NO repeated measures.&lt;/P&gt;&lt;P&gt;I want to account for the random effect of experimental day and have considered 2 ways of including it and am wondering which way is best.&amp;nbsp; I would also appreciate any explanation of why one way is better than the other in which circumstances so that I can improve my understanding.&amp;nbsp; These are the two codes that I have been working with for this experiment.&amp;nbsp; I am using SAS 9.3.&lt;/P&gt;&lt;P&gt;1) Experimental day ("exptday") alone as the random variable, with "treat" as the independent variable and "area" as the dependent variable:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix plots=ResidualPanel; 
class exptday treat;
model area = treat;
random  exptday;
lsmeans treat / pdiff cl;
output out=out1 pred=p resid=r;
title 'Analysis of area by treatment';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2) Experimental day also included as an "interaction" with treatment&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix plots=ResidualPanel; 
class exptday treat;
model area = treat;
random  exptday exptday*treat;
lsmeans treat / pdiff cl;
output out=out1 pred=p resid=r;
title 'Analysis of area by treatment';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any assistance or feedback would be appreciated as I am eager to learn!&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 00:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697278#M33636</guid>
      <dc:creator>jsquirre</dc:creator>
      <dc:date>2020-11-07T00:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is the proper way to define random variable in GLIMMIX?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697619#M33660</link>
      <description>&lt;P&gt;This is a randomized block design, where exptday is the blocking factor.&amp;nbsp; With multiple observations per day and treatment, inclusion of the treatment by exptday interaction will result in the correct degrees of freedom for the test of treatment effect differences.&amp;nbsp; If you do not include it, then the residual error with the residual degrees of freedom would be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 14:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697619#M33660</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-09T14:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: What is the proper way to define random variable in GLIMMIX?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697770#M33663</link>
      <description>&lt;P&gt;Hi Steve -&lt;/P&gt;&lt;P&gt;Thank you for taking the time to answer my query.&amp;nbsp; As you suggested, I will include the&lt;/P&gt;&lt;PRE class="language-sas"&gt;&lt;CODE&gt;random  exptday exptday*treat;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;term in my analysis code.&amp;nbsp; As I mentioned, I am new at this and still struggle with identifying the correct degrees of freedom for a given experimental design.&amp;nbsp; I appreciate your explanation.&lt;/P&gt;&lt;P&gt;Sincerely,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jayne&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 23:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/What-is-the-proper-way-to-define-random-variable-in-GLIMMIX/m-p/697770#M33663</guid>
      <dc:creator>jsquirre</dc:creator>
      <dc:date>2020-11-09T23:30:41Z</dc:date>
    </item>
  </channel>
</rss>

