<?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 compare proportions across groups in PROC SURVEYFREQ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945052#M370270</link>
    <description>&lt;P&gt;I am a bit confused by&amp;nbsp; this part of your want: "chi-sq test between (TEETHGUM_DICH=1 + MADV=1) and (TEETHGUM_DICH=1 and MADV=0)."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your output does not show any value of MADV=0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chi-sqr is basically a test of distribution. When you have var1*var2 the chi-sqr statistic reports basically are the observed counts close to the expected (not a significant difference) or not (significant difference) based on the row and column total counts.&lt;/P&gt;
&lt;P&gt;So there is no "this point vs that point" with chi-sq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the crosstab output into a data set use: ods output crosstabs= mycrosstabdataset;&lt;/P&gt;
&lt;P&gt;To get the Chi-sqr results into a data set use: ods output chisqr= mychisqrdataset;&lt;/P&gt;
&lt;P&gt;or which ever libname.data set you want instead of the mycrosstabdataset.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2024 14:25:29 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-09-24T14:25:29Z</dc:date>
    <item>
      <title>How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945038#M370266</link>
      <description>&lt;DIV&gt;I am trying to compare proportion of groups with MADV=1 or MADV=2 meeting an outcome (TEETHGUM_DICH=1). I want to do this separately for age groups (AGE_DICH), which is why I've set this up as a three-way comparison. However, I can't figure out how to code this to get a chi-sq test between (TEETHGUM_DICH=1 + MADV=1)&amp;nbsp; and (TEETHGUM_DICH=1 and MADV=2). I want to use ODS to shape the output so getting that ChiSq output in the same row would be really helpful.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Code I am using, with a photo of output and the desired numbers to test between. Please let me know if you have any advice -- thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc surveyfreq data=dental_final method=brr(fay=0.3);&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;title 'Weighted / Unweighted n'; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;weight ER_EEYRSWGT; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;repweight ER_EEYRS1--ER_EEYRS100; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;table age_dich*madv*teethgum_dich / chisq;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;where ER_EEYRSWGT NE .;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_example.PNG" style="width: 532px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100623i01E9AAD0E7981612/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_example.PNG" alt="sas_example.PNG" /&gt;&lt;/span&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945038#M370266</guid>
      <dc:creator>bucky032</dc:creator>
      <dc:date>2024-09-24T14:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945052#M370270</link>
      <description>&lt;P&gt;I am a bit confused by&amp;nbsp; this part of your want: "chi-sq test between (TEETHGUM_DICH=1 + MADV=1) and (TEETHGUM_DICH=1 and MADV=0)."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your output does not show any value of MADV=0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chi-sqr is basically a test of distribution. When you have var1*var2 the chi-sqr statistic reports basically are the observed counts close to the expected (not a significant difference) or not (significant difference) based on the row and column total counts.&lt;/P&gt;
&lt;P&gt;So there is no "this point vs that point" with chi-sq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the crosstab output into a data set use: ods output crosstabs= mycrosstabdataset;&lt;/P&gt;
&lt;P&gt;To get the Chi-sqr results into a data set use: ods output chisqr= mychisqrdataset;&lt;/P&gt;
&lt;P&gt;or which ever libname.data set you want instead of the mycrosstabdataset.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945052#M370270</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-24T14:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945054#M370271</link>
      <description>&lt;P&gt;Sorry, I meant MADV=1 vs MADV=2.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945054#M370271</guid>
      <dc:creator>bucky032</dc:creator>
      <dc:date>2024-09-24T14:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945056#M370272</link>
      <description>&lt;P&gt;I may be using 'chi sq' incorrectly, but I want to test the difference between proportions of MADV=1 and MADV=2 populations meeting the TEETHGUM_DICH outcome.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945056#M370272</guid>
      <dc:creator>bucky032</dc:creator>
      <dc:date>2024-09-24T14:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945060#M370273</link>
      <description>&lt;P&gt;This is a better representation of what I am trying to test -- based on the frequencies, is there a significant difference between MADV=1 and MADV=2 in the proportion of people meeting TEETHGUM_DICH=1?&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_example_2.PNG" style="width: 692px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100626i12E6EBCB574331E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_example_2.PNG" alt="sas_example_2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945060#M370273</guid>
      <dc:creator>bucky032</dc:creator>
      <dc:date>2024-09-24T14:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945063#M370274</link>
      <description>&lt;P&gt;I believe that PROC SURVEYLOGISTIC can compare these two percents, using the LSMEANS statement or the SLICE statement.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 15:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945063#M370274</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-24T15:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945073#M370278</link>
      <description>&lt;P&gt;Hi Paige. Any advice about how to set that up? What statistics am I looking for?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 16:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945073#M370278</guid>
      <dc:creator>bucky032</dc:creator>
      <dc:date>2024-09-24T16:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare proportions across groups in PROC SURVEYFREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945074#M370279</link>
      <description>&lt;P&gt;After I posted the comment about SURVEYLOGISTIC, I realized that SURVEYLOGISTIC would compare the LSMEANS (based upon a fitted model) and would not compare the actual means (percents) that you show. So upon further thought, it doesn't seem like SURVEYLOGISTIC is the right tool here. Now maybe you would consider changing your needs and compare the fitted percents, but you haven't said that's what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 16:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-proportions-across-groups-in-PROC-SURVEYFREQ/m-p/945074#M370279</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-24T16:57:34Z</dc:date>
    </item>
  </channel>
</rss>

