<?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 Power Divergence Test Statistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Power-Divergence-Test-Statistic/m-p/240111#M12704</link>
    <description>&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-left lia-quilt-column-main-left"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;
&lt;DIV class="lia-message-author lia-component-author"&gt;
&lt;DIV class="lia-message-author-avatar"&gt;&amp;nbsp;I am looking for SAS syntax or SAS macro with Code that will perform Goodness of Fits on discrete categorical data.&amp;nbsp;
&lt;DIV id="messagebodydisplay_0" class="lia-message-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Specifically one that shows how to do the math described by N. Cressie, T.R.C. Read, in their paper entitled&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Multinomial goodness-of-fit tests," J. Roy. Statist. Soc. B 46 (1984) 440–464.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have code now for 4 of the 5 test statistics I need.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;proc freq gives the Pearson's Chi Square,&lt;/LI&gt;
&lt;LI&gt;Proc Univarite produces the Komogorov Smirnov test statistic,&lt;/LI&gt;
&lt;LI&gt;Proc Probit produces the Log Likelihood Ratio as does Proc GenMod,&lt;/LI&gt;
&lt;LI&gt;Proc Multtest&amp;nbsp; calculates the Freeman-Tukey test statistic,&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;but I have not been able to find the Power divergence test&lt;/STRONG&gt; show in the image attached here.&amp;nbsp;&amp;nbsp; I found some R code so maybe I can run it inside SAS enterprise guide?&amp;nbsp; But I do NOT have a SAS/IML or SAS Enterprise Miner license so I can not run the R code inside a node that way.&amp;nbsp; Please advise.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12152i0F48239E0465FD9F/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="five statistical tests.JPG" title="five statistical tests.JPG" /&gt;</description>
    <pubDate>Fri, 18 Dec 2015 21:13:23 GMT</pubDate>
    <dc:creator>marygc</dc:creator>
    <dc:date>2015-12-18T21:13:23Z</dc:date>
    <item>
      <title>Power Divergence Test Statistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Power-Divergence-Test-Statistic/m-p/240111#M12704</link>
      <description>&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-left lia-quilt-column-main-left"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;
&lt;DIV class="lia-message-author lia-component-author"&gt;
&lt;DIV class="lia-message-author-avatar"&gt;&amp;nbsp;I am looking for SAS syntax or SAS macro with Code that will perform Goodness of Fits on discrete categorical data.&amp;nbsp;
&lt;DIV id="messagebodydisplay_0" class="lia-message-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Specifically one that shows how to do the math described by N. Cressie, T.R.C. Read, in their paper entitled&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Multinomial goodness-of-fit tests," J. Roy. Statist. Soc. B 46 (1984) 440–464.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have code now for 4 of the 5 test statistics I need.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;proc freq gives the Pearson's Chi Square,&lt;/LI&gt;
&lt;LI&gt;Proc Univarite produces the Komogorov Smirnov test statistic,&lt;/LI&gt;
&lt;LI&gt;Proc Probit produces the Log Likelihood Ratio as does Proc GenMod,&lt;/LI&gt;
&lt;LI&gt;Proc Multtest&amp;nbsp; calculates the Freeman-Tukey test statistic,&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;but I have not been able to find the Power divergence test&lt;/STRONG&gt; show in the image attached here.&amp;nbsp;&amp;nbsp; I found some R code so maybe I can run it inside SAS enterprise guide?&amp;nbsp; But I do NOT have a SAS/IML or SAS Enterprise Miner license so I can not run the R code inside a node that way.&amp;nbsp; Please advise.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12152i0F48239E0465FD9F/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="five statistical tests.JPG" title="five statistical tests.JPG" /&gt;</description>
      <pubDate>Fri, 18 Dec 2015 21:13:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Power-Divergence-Test-Statistic/m-p/240111#M12704</guid>
      <dc:creator>marygc</dc:creator>
      <dc:date>2015-12-18T21:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Power Divergence Test Statistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Power-Divergence-Test-Statistic/m-p/240126#M12706</link>
      <description>&lt;P&gt;It can be computed with a SQL query from proc freq output. For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.heart;
where weight_status is not missing;
table sex*weight_status / out=cellcounts outexpect;
run;

%let lambda=(2/3);

proc sql;
select
    &amp;amp;lambda as lambda, 
    2/(&amp;amp;lambda*(1+&amp;amp;lambda))*sum(COUNT*((COUNT/EXPECTED)**&amp;amp;lambda-1)) as powerDivergence
from cellCounts;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Dec 2015 03:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Power-Divergence-Test-Statistic/m-p/240126#M12706</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-19T03:19:26Z</dc:date>
    </item>
  </channel>
</rss>

