<?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 GLIMMIX with two repeated measures variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/m-p/232686#M54741</link>
    <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to GLMMs and want to check that I have used the appropriate syntax for my analyses.&amp;nbsp; I'm analysing a longitudinal study looking at children's ('subject') behaviours ('beh') towards eleven different stimuli ('stimulus') at four different timepoints ('time').&amp;nbsp; Time and stimulus are repeated measures variables as all children were exposed to all stimuli at all timepoints.&amp;nbsp; I'm testing against a Poisson distribution because the behavioural data are counts (and there is no overdispersion).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My basic syntax looks like this:&lt;/P&gt;&lt;P&gt;proc glimmix data=data method=laplace ic=q;&lt;BR /&gt;class subject stimulus;&lt;BR /&gt;model beh = stimulus time stimulus*time / s dist=Poisson;&lt;BR /&gt;random int / subject=subject;&lt;BR /&gt;random stimulus / subject=subject;&lt;BR /&gt;random time / type=AR(1) subject=subject;&lt;/P&gt;&lt;P&gt;nloptions tech=quanew;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm testing these full models against nested models with fewer fixed effects (stimulus &amp;amp; time without the interaction, stimulus only, time only, and a null model with no fixed effects) and selecting models on the basis of their AIC values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are these analyses appropriate for my data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 02 Nov 2015 06:16:16 GMT</pubDate>
    <dc:creator>jr89</dc:creator>
    <dc:date>2015-11-02T06:16:16Z</dc:date>
    <item>
      <title>GLIMMIX with two repeated measures variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/m-p/232686#M54741</link>
      <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to GLMMs and want to check that I have used the appropriate syntax for my analyses.&amp;nbsp; I'm analysing a longitudinal study looking at children's ('subject') behaviours ('beh') towards eleven different stimuli ('stimulus') at four different timepoints ('time').&amp;nbsp; Time and stimulus are repeated measures variables as all children were exposed to all stimuli at all timepoints.&amp;nbsp; I'm testing against a Poisson distribution because the behavioural data are counts (and there is no overdispersion).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My basic syntax looks like this:&lt;/P&gt;&lt;P&gt;proc glimmix data=data method=laplace ic=q;&lt;BR /&gt;class subject stimulus;&lt;BR /&gt;model beh = stimulus time stimulus*time / s dist=Poisson;&lt;BR /&gt;random int / subject=subject;&lt;BR /&gt;random stimulus / subject=subject;&lt;BR /&gt;random time / type=AR(1) subject=subject;&lt;/P&gt;&lt;P&gt;nloptions tech=quanew;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm testing these full models against nested models with fewer fixed effects (stimulus &amp;amp; time without the interaction, stimulus only, time only, and a null model with no fixed effects) and selecting models on the basis of their AIC values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are these analyses appropriate for my data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Nov 2015 06:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/m-p/232686#M54741</guid>
      <dc:creator>jr89</dc:creator>
      <dc:date>2015-11-02T06:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX with two repeated measures variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/m-p/232834#M54756</link>
      <description>&lt;P&gt;There are many ways to construct a covariance matrix for subjects with a single repeated measurement factor, and there are very many more ways when there are two repeated measures factors. In the MIXED procedure, we have access to Kronecker products (UN@UN, UN@AR(1), and UN@CS), but these options don't exist for GLIMMIX. And there could be more parsimonious covariance matrices than those using UN. I would think that logic and context could help determine plausible structures--what might be correlated and in what fashion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might find this paper by Tao, Kiernan and Gibbs (2015) to be helpful:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I dinked around with various constructions awhile back. I'll attach my code. I won't guarantee that the code (or the descriptions within) are correct, it really ought to be thought of as a work in progress. But perhaps it will be of some use.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as your modeling protocol goes, once you settle on a covariance structure, then you &lt;EM&gt;could&lt;/EM&gt; base model selection on AIC (because Laplace is a maximum likelihood method). But I wouldn't; I usually use the approximate tests provided by GLIMMIX, using ddfm=kr, provided the model converges and estimation is decent. For an R-world opinion, see "What is the best way to test hypotheses on effects in GLMMs?" at&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://glmm.wikidot.com/faq" target="_self"&gt;http://glmm.wikidot.com/faq&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;H3 id="toc2"&gt;&amp;nbsp;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2015 23:30:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/m-p/232834#M54756</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2015-11-02T23:30:32Z</dc:date>
    </item>
  </channel>
</rss>

