<?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: Chi Square Test of Homogeneity in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798633#M39273</link>
    <description>&lt;P&gt;Use the population data to obtain the proportions of the population in each category. For example, your population might have 10% Asian, 40% black, and&amp;nbsp;50% white.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_examples03.htm" target="_self"&gt;use those numbers on the TESTP= option on the TABLES statement&lt;/A&gt; in PROC FREQ:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=Have out=Sample;
by Race;   /* assume values are Asian, Black, and White */
run;

proc freq data = Sample order=data;
   tables Race / nocum chisq
   /* If population proportions are for Asian, Black, and White */
                  testp=(0.1  0.40  0.5);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 25 Feb 2022 16:29:38 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2022-02-25T16:29:38Z</dc:date>
    <item>
      <title>Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798628#M39271</link>
      <description>I am needing to do a Chi Square test of Homogeneity. I know how to do the Chi Square test of Independence, my issue is I have 2 datasets. One dataset for one population and another dataset (same variables) for the second population. Do I need to have these in the same dataset to do the test?</description>
      <pubDate>Fri, 25 Feb 2022 16:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798628#M39271</guid>
      <dc:creator>CatPaws</dc:creator>
      <dc:date>2022-02-25T16:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798633#M39273</link>
      <description>&lt;P&gt;Use the population data to obtain the proportions of the population in each category. For example, your population might have 10% Asian, 40% black, and&amp;nbsp;50% white.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_examples03.htm" target="_self"&gt;use those numbers on the TESTP= option on the TABLES statement&lt;/A&gt; in PROC FREQ:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=Have out=Sample;
by Race;   /* assume values are Asian, Black, and White */
run;

proc freq data = Sample order=data;
   tables Race / nocum chisq
   /* If population proportions are for Asian, Black, and White */
                  testp=(0.1  0.40  0.5);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Feb 2022 16:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798633#M39273</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-02-25T16:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798689#M39274</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I think I understand what you are saying, but when I look at that document, it shows two Chi-Square test,( one for each region). I am only wanting to do one Chi-Square test, based off two different groups. I have attached a document that shows the frequency of sex, Females and Males,in Case group, as well as the frequency of sex3, Females and Males, in Case3 group. Since they are in two different data sets, how would I code this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*I will exclude the Unknown values before analysis, but I am more interested in how to set up the code right now&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 17:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798689#M39274</guid>
      <dc:creator>CatPaws</dc:creator>
      <dc:date>2022-02-25T17:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798696#M39275</link>
      <description>&lt;P&gt;The two groups will need to be in the same data set, with an indicator variable that defines which group the observation belong to.&amp;nbsp; That group variable would then appear on the TABLES statement.&lt;/P&gt;
&lt;P&gt;So for example, if you wanted to test if the distribution of race across the two groups was the same, then you would have:&lt;/P&gt;
&lt;P&gt;tables group*race/chisq;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 17:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798696#M39275</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-02-25T17:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798730#M39280</link>
      <description>Now we are getting somewhere lol. Since my oberservation IDs are identified by numbers, it would be difficult to try to create a dummy variable for them since they follow no specific order, rhyme, or reason. However, what separates my two populations is a date range. My next question is how do you create an indicator variable using a date range? For example, group 1 is defined from Nov 1999-Jan 2000, and group two is defined as Feb 2000-April 2000. How would that look coded?</description>
      <pubDate>Fri, 25 Feb 2022 19:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/798730#M39280</guid>
      <dc:creator>CatPaws</dc:creator>
      <dc:date>2022-02-25T19:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/799138#M39300</link>
      <description>&lt;P&gt;What is the response variable here?&amp;nbsp; I must have missed that&amp;nbsp; &amp;nbsp;Anyhow, if there is a date on every record, you can code in a flag based on the cutoff date.&amp;nbsp; I think you can ignore observation ID in the PROC FREQ analysis.&amp;nbsp; If you become interested in a more complex/complete approach, you might be able to use PROC GENMOD with a GEE model to test for the time segment equality/homogeneity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 14:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/799138#M39300</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-02-28T14:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/799407#M39323</link>
      <description>&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you. Do you have any references or suggestions on how I code it based on the cutoff date?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 18:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/799407#M39323</guid>
      <dc:creator>CatPaws</dc:creator>
      <dc:date>2022-03-01T18:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Chi Square Test of Homogeneity</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/800203#M39355</link>
      <description>&lt;P&gt;There are probably 50 threads on how to do that, especially in the Programming forum.&amp;nbsp; Search and you will find.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 15:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-Test-of-Homogeneity/m-p/800203#M39355</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-03-04T15:31:10Z</dc:date>
    </item>
  </channel>
</rss>

