<?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 negative binomial distribution question in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51579#M2286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All seems fine to me except for the presence of&lt;STRONG&gt; trt &lt;/STRONG&gt;as a random effect. There is no need that I can think of for treating levels of trt as samples from a population of treatments. I propose you use : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=abundancevisit1withsub;&lt;/P&gt;&lt;P&gt;class trt blk;&lt;/P&gt;&lt;P&gt;model y = trt / dist=negbinomial link=log;&lt;/P&gt;&lt;P&gt;random int / sub=blk solution;&lt;/P&gt;&lt;P&gt;lsmeans trt / cl pdiff ilink;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 31 Mar 2012 20:26:14 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2012-03-31T20:26:14Z</dc:date>
    <item>
      <title>GLIMMIX negative binomial distribution question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51578#M2285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;This posting is a follow-up question to a previous posting regarding using PROC GLIMMIX for a simple RCBD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Study Background: I vacuum sampled insects off of 10 wallscovered in vines and 10 adjacent blank walls during three separate months last summer.&amp;nbsp; At each site 10 subsamples were taken.&amp;nbsp; Study mimics an RBCD.&amp;nbsp; Single treatment factor has 2 levels-green and not green.&amp;nbsp; Each site is treated as a block containing both a blank and a green wall and each site contains 10&amp;nbsp; 0.75 m^2 subsamples.&amp;nbsp; Insect abundance data from the walls follow a non normal distribution and lack equality of variance.&amp;nbsp; Thus the PROC GLIMMIX.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on helpful suggestions from IVM and PGSTATS I included subsamples in my model and did not normalize my data by subsample size.&amp;nbsp; This resulted in data which contained many zeros for blank walls and many higher numbers for green walls.&amp;nbsp; Although I originally was using a Poisson distribution, by including my raw data and my subsamples my Pierson Chi Square/DF became very high (example 9.1).&amp;nbsp; I tried using a negative binomial distribution and obtained a much better fit statistic (1.15).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically wanted to make sure my code is correct and wanted to see if people had any comments on the use of negative binomial distribution for this kind of data. An example for one month’s sampling is below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data abundancevisit1withsub;&lt;/P&gt;&lt;P&gt;input blk trt$ subsample y;&lt;/P&gt;&lt;P&gt;lines;&lt;/P&gt;&lt;P&gt;1 g 1 4&lt;/P&gt;&lt;P&gt;1 g 2 2&lt;/P&gt;&lt;P&gt;1 g 3 1&lt;/P&gt;&lt;P&gt;1 g 4 7&lt;/P&gt;&lt;P&gt;1 g 5 2&lt;/P&gt;&lt;P&gt;1 g 6 3&lt;/P&gt;&lt;P&gt;1 g 7 .&lt;/P&gt;&lt;P&gt;1 g 8 7&lt;/P&gt;&lt;P&gt;1 g 9 5&lt;/P&gt;&lt;P&gt;1 g 10 10&lt;/P&gt;&lt;P&gt;1 b 11 0&lt;/P&gt;&lt;P&gt;1 b 12 0&lt;/P&gt;&lt;P&gt;1 b 13 0&lt;/P&gt;&lt;P&gt;2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;P&gt;run;&lt;/P&gt;&lt;P&gt;proc glimmix data=abundancevisit1withsub method=quad;&lt;/P&gt;&lt;P&gt;class trt blk subsample;&lt;/P&gt;&lt;P&gt;model y = trt / dist=negbinomial link=log;&lt;/P&gt;&lt;P&gt;random int trt / sub=blk;&lt;/P&gt;&lt;P&gt;lsmeans trt / cl&amp;nbsp; ilink;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="color: #000080; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2012 18:05:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51578#M2285</guid>
      <dc:creator>SMATT1</dc:creator>
      <dc:date>2012-03-31T18:05:47Z</dc:date>
    </item>
    <item>
      <title>GLIMMIX negative binomial distribution question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51579#M2286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All seems fine to me except for the presence of&lt;STRONG&gt; trt &lt;/STRONG&gt;as a random effect. There is no need that I can think of for treating levels of trt as samples from a population of treatments. I propose you use : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=abundancevisit1withsub;&lt;/P&gt;&lt;P&gt;class trt blk;&lt;/P&gt;&lt;P&gt;model y = trt / dist=negbinomial link=log;&lt;/P&gt;&lt;P&gt;random int / sub=blk solution;&lt;/P&gt;&lt;P&gt;lsmeans trt / cl pdiff ilink;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2012 20:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51579#M2286</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-03-31T20:26:14Z</dc:date>
    </item>
    <item>
      <title>GLIMMIX negative binomial distribution question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51580#M2287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually you do need the trt in the random statement &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random int trt / sub=blk solution;&lt;/P&gt;&lt;P&gt;This statement gives random effects of blk and trt*blk, and the latter serves as the "experimental error" term. Without this, the procedure would confuse the subsamples for the experimental units. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 01:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-negative-binomial-distribution-question/m-p/51580#M2287</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2012-04-02T01:43:38Z</dc:date>
    </item>
  </channel>
</rss>

