<?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: How to consider replicated measurements over time as a random effect? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600539#M29213</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt; for your help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2019 20:41:24 GMT</pubDate>
    <dc:creator>vitormacedo</dc:creator>
    <dc:date>2019-10-30T20:41:24Z</dc:date>
    <item>
      <title>How to consider replicated measurements over time as a random effect?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600177#M29192</link>
      <description>&lt;P&gt;Dear all.&lt;/P&gt;&lt;P&gt;I have a data set as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input Person Day Drug$ Response;
cards;
1 1 A .
1 2 A .
1 3 A .
2 1 A .
2 2 A .
2 3 A .
3 1 B .
3 2 B .
3 3 B .
4 1 B .
4 2 B .
4 3 B .
5 1 C .
5 2 C .
5 3 C .
6 1 C .
6 2 C .
6 3 C .
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My goal is to test the difference between drugs.&amp;nbsp;To increase the amount of data, assessment was made over three days (Day) on each Person.&amp;nbsp;Initially, I thought of the following command to&amp;nbsp;analyse the data:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=test;
class Droug Day;
model Response=Droug/htype=3;
random Day/type=covariance_structure;
lsmeans Droug;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;"random Day" because Day is a random effect factor as block, and "type = covariance_structure" because days are correlated, because they are measured in the same person.&lt;/P&gt;&lt;P&gt;However,&amp;nbsp;I read the following paper:&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/198-29.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/198-29.pdf&lt;/A&gt;&amp;nbsp;.&amp;nbsp;And maybe the correct command is as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=test;
class Droug Day Person;
model Response=Droug/htype=3;
random Droug/type=covariance_structure subject=Person;
repeated Droug/type=covariance_structure subject=Day(Person);
lsmeans Droug;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm in doubt!!!&lt;/P&gt;&lt;P&gt;For my goal. Can I use the first command? Or do I have to use the second command?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I appreciate all the help. Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 21:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600177#M29192</guid>
      <dc:creator>vitormacedo</dc:creator>
      <dc:date>2019-10-29T21:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider replicated measurements over time as a random effect?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600535#M29212</link>
      <description>&lt;P&gt;If you assume that PERSON is a random effect and that DAY is a random effect, then PERSON and DAY are crossed random effects: each PERSON is observed for each DAY (each PERSON is a block for DAYs), and each DAY is observed for each PERSON (each DAY is a block for PERSONs). More commonly, random effects are nested, but crossed is possible. Generally, you would consider PERSONs to be independent, but DAYs might possibly be correlated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that scenario, I would consider this code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=test;
    class person drug day;
    model response = drug;
    random person(drug);
    random day / subject=intercept type=&amp;lt;some covariance structure&amp;gt; g;
    lsmeans drug;
    run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The paper that you link to does not address this type of model structure, so I do not think it provides an appropriate template for analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 20:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600535#M29212</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2019-10-30T20:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider replicated measurements over time as a random effect?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600539#M29213</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt; for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 20:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-consider-replicated-measurements-over-time-as-a-random/m-p/600539#M29213</guid>
      <dc:creator>vitormacedo</dc:creator>
      <dc:date>2019-10-30T20:41:24Z</dc:date>
    </item>
  </channel>
</rss>

