<?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 random and repeated terms in poisson/negbin mixed model in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/random-and-repeated-terms-in-poisson-negbin-mixed-model/m-p/60412#M17105</link>
    <description>Hi&lt;BR /&gt;
I am analyzing count data which was collected during transects, in different fields, at different time periods. I want to use a mixed model in which I can have the transects within fields included as a random factor, as in some cases more than one transect is associated with a field. I also want to include the sampling rounds as a repeated measure.&lt;BR /&gt;
&lt;BR /&gt;
Firstly I tried PROC GLIMMIX. I just included the random effect of transect within field. As my data is count data my models had much better measures of fit and overdispersion when i used dist=poisson, I think because my data contains many zeros it worked even better with dist=negbin. So it makes sense for me to include a distribution family. &lt;BR /&gt;
&lt;BR /&gt;
proc glimmix data=xxx;&lt;BR /&gt;
class round treatment field transect;&lt;BR /&gt;
model y = round treatment round*treatment / dist=poisson;&lt;BR /&gt;
random transect(field);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The above model works fine and then I come unstuck trying to add in repeated=sampling round. &lt;BR /&gt;
In GLIMMIX it seems that there is no repeated option so I would have to include it as a random effect when i do this (below) the model runs forever and I have to stop it.&lt;BR /&gt;
&lt;BR /&gt;
proc glimmix data=xxx;&lt;BR /&gt;
class round treatment field transect;&lt;BR /&gt;
model y = round treatment round*treatment / dist=poisson;&lt;BR /&gt;
random = round / type = AR(1) subject=subj;&lt;BR /&gt;
random transect(field);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
If I use PROC MIXED I can add both the random and repeated statements but can't specify poisson or negative binomial errors so my AIC measure is really large.&lt;BR /&gt;
Does anyone have any advice or suggestions on how to include repeated measures as a random factor in PROC GLIMMIX? I am wondering if the reason my PROC GLIMMIX model wont run with the repeated measure as a random statement is because my subject is wrong. At the moment it is 'subj' which is the count recorded from each transect in each field during each time period.&lt;BR /&gt;
&lt;BR /&gt;
Any advice would be greatly appreciated!&lt;BR /&gt;
Thankyou in advance &lt;BR /&gt;
Claire</description>
    <pubDate>Thu, 30 Jul 2009 16:07:39 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-07-30T16:07:39Z</dc:date>
    <item>
      <title>random and repeated terms in poisson/negbin mixed model</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/random-and-repeated-terms-in-poisson-negbin-mixed-model/m-p/60412#M17105</link>
      <description>Hi&lt;BR /&gt;
I am analyzing count data which was collected during transects, in different fields, at different time periods. I want to use a mixed model in which I can have the transects within fields included as a random factor, as in some cases more than one transect is associated with a field. I also want to include the sampling rounds as a repeated measure.&lt;BR /&gt;
&lt;BR /&gt;
Firstly I tried PROC GLIMMIX. I just included the random effect of transect within field. As my data is count data my models had much better measures of fit and overdispersion when i used dist=poisson, I think because my data contains many zeros it worked even better with dist=negbin. So it makes sense for me to include a distribution family. &lt;BR /&gt;
&lt;BR /&gt;
proc glimmix data=xxx;&lt;BR /&gt;
class round treatment field transect;&lt;BR /&gt;
model y = round treatment round*treatment / dist=poisson;&lt;BR /&gt;
random transect(field);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The above model works fine and then I come unstuck trying to add in repeated=sampling round. &lt;BR /&gt;
In GLIMMIX it seems that there is no repeated option so I would have to include it as a random effect when i do this (below) the model runs forever and I have to stop it.&lt;BR /&gt;
&lt;BR /&gt;
proc glimmix data=xxx;&lt;BR /&gt;
class round treatment field transect;&lt;BR /&gt;
model y = round treatment round*treatment / dist=poisson;&lt;BR /&gt;
random = round / type = AR(1) subject=subj;&lt;BR /&gt;
random transect(field);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
If I use PROC MIXED I can add both the random and repeated statements but can't specify poisson or negative binomial errors so my AIC measure is really large.&lt;BR /&gt;
Does anyone have any advice or suggestions on how to include repeated measures as a random factor in PROC GLIMMIX? I am wondering if the reason my PROC GLIMMIX model wont run with the repeated measure as a random statement is because my subject is wrong. At the moment it is 'subj' which is the count recorded from each transect in each field during each time period.&lt;BR /&gt;
&lt;BR /&gt;
Any advice would be greatly appreciated!&lt;BR /&gt;
Thankyou in advance &lt;BR /&gt;
Claire</description>
      <pubDate>Thu, 30 Jul 2009 16:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/random-and-repeated-terms-in-poisson-negbin-mixed-model/m-p/60412#M17105</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-07-30T16:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: random and repeated terms in poisson/negbin mixed model</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/random-and-repeated-terms-in-poisson-negbin-mixed-model/m-p/60413#M17106</link>
      <description>Just a kind comment: for these forums, you need not post a particular query in multiple forums.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 30 Jul 2009 17:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/random-and-repeated-terms-in-poisson-negbin-mixed-model/m-p/60413#M17106</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-30T17:18:55Z</dc:date>
    </item>
  </channel>
</rss>

