<?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 test the fit of discrete distributions? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-the-fit-of-discrete-distributions/m-p/134804#M7030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The chi-square value is presented in the goodness-of-fit table, so getting this into a dataset with ODS OUTPUT should not be difficult. I do worry that the goodness of fit applies to a model with some terms in it, so you may have to change to:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc genmod; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class field;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;freq observ_freq; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model class.insect =field / dist=binomial; &lt;/STRONG&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course that makes it impossible to find out if different distributions are better applied in different fields.&amp;nbsp; So, try your method first, and if it gives no results in the goodness of fit table, you could try regressing on a dummy variable, such as regressing on a constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jun 2014 12:08:00 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-06-10T12:08:00Z</dc:date>
    <item>
      <title>How to test the fit of discrete distributions?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-the-fit-of-discrete-distributions/m-p/134803#M7029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I appreciate if someone can help me with this question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Context:&lt;/P&gt;&lt;P&gt;In-field insect density was determined for different crop fields ("groups"). I have the frequency of the number of insects per sampling unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance,&lt;/P&gt;&lt;P&gt;field=1: the frequency of "zeros" insects per sampling unit was 353. The frequency of "ones" was 19.&lt;/P&gt;&lt;P&gt;field=2: the frequency of "zeros" was 580. The frequency of "ones" was 30. The frequency of "twos" was 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="127" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border-width: 0px; border-color: rgb(0, 0, 0); border-style: solid; width: 336px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;field&lt;/TD&gt;&lt;TD class="xl66" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;class.insect&lt;/TD&gt;&lt;TD class="xl65" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="112"&gt;observ_freq&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl69" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="112"&gt;353&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl69" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="112"&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl72" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;0&lt;/TD&gt;&lt;TD class="xl73" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="112"&gt;580&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl72" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl73" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="112"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl72" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl73" style="color: #575757; text-align: center; padding: 0px; background-color: transparent; font-family: arial,helvetica,sans-serif;" width="112"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to compare the observed frequency of each one of my fifteen fields with discrete distributions using chi-square test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use PROC GENMOD because I think PROC DISCRETE is not available anymore.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc genmod; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by field;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;freq observ_freq; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model class.insect = / dist=binomial; &lt;/STRONG&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am planning to test for the following discrete distributions:&lt;/P&gt;&lt;P&gt;Binomial&lt;/P&gt;&lt;P&gt;Inverse Gaussian&lt;/P&gt;&lt;P&gt;Multinomial&lt;/P&gt;&lt;P&gt;Negative binomial&lt;/P&gt;&lt;P&gt;Normal&lt;/P&gt;&lt;P&gt;Poisson&lt;/P&gt;&lt;P&gt;Zero-inflated Poisson&lt;/P&gt;&lt;P&gt;Zero-inflated negative binomial&lt;/P&gt;&lt;P&gt;Double Poisson&lt;/P&gt;&lt;P&gt;Neyman type A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final table should look like this image from Env. Ento. 30(2) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="final_table.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/6560_final_table.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 18:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-the-fit-of-discrete-distributions/m-p/134803#M7029</guid>
      <dc:creator>TMAlves</dc:creator>
      <dc:date>2014-06-09T18:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to test the fit of discrete distributions?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-the-fit-of-discrete-distributions/m-p/134804#M7030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The chi-square value is presented in the goodness-of-fit table, so getting this into a dataset with ODS OUTPUT should not be difficult. I do worry that the goodness of fit applies to a model with some terms in it, so you may have to change to:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc genmod; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class field;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;freq observ_freq; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model class.insect =field / dist=binomial; &lt;/STRONG&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course that makes it impossible to find out if different distributions are better applied in different fields.&amp;nbsp; So, try your method first, and if it gives no results in the goodness of fit table, you could try regressing on a dummy variable, such as regressing on a constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 12:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-the-fit-of-discrete-distributions/m-p/134804#M7030</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-06-10T12:08:00Z</dc:date>
    </item>
  </channel>
</rss>

