<?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: Help with splitting data and running Chi Square in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623126#M19887</link>
    <description>&lt;P&gt;If you still want to go with the proc freq analysis, I think you need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = SplitData1;
tables MI * Selected / chisq;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Variable Selected is created by proc surveyselect in the output dataset when you use option outall.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 17:50:42 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-02-07T17:50:42Z</dc:date>
    <item>
      <title>Help with splitting data and running Chi Square</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623037#M19878</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with an NHANES dataset and have randomly split it using&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc surveyselect data=Table1 samprate=0.50 outall seed=1234 out=SplitData 
           method=srs noprint;
		         run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now I am wanting to compare outcomes for two methods of measuring blood pressure. Each group has been assigned one of the methods. For example, I want to know if there is statistical difference between the two groups with prevalence of MI/Stroke/Heart Failure. As an example, for Group 1 MI=40, Stroke=39, HF=40 and Group 2 MI=54, Stroke=47&amp;nbsp; HF=49. Are there statistically significant more MIs in Group 2?&lt;/P&gt;&lt;P&gt;I am brand new to SAS and cannot understand how to do this. The best I've come up with is&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = SplitData1 order=formatted;
tables MI? * BloodPressure?/ chisq;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do I need to turn Blood Pressure which is a continuous variable into a categorical variable?&lt;/P&gt;&lt;P&gt;I would really appreciate some advice. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 14:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623037#M19878</guid>
      <dc:creator>pubhealthguy</dc:creator>
      <dc:date>2020-02-07T14:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with splitting data and running Chi Square</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623089#M19879</link>
      <description>&lt;P&gt;Do you want to compare this across the entire data set? If so, what is the purpose of splitting the data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe that NHANES data is a complex survey structure and would require the SURVEY versions of Freq , Means and such for analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I strongly suggest that you investigate the links here:&amp;nbsp; &lt;A href="https://www.cdc.gov/nchs/tutorials/NHANES/downloads/intro.htm" target="_blank"&gt;https://www.cdc.gov/nchs/tutorials/NHANES/downloads/intro.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;to find example code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to deal with the FREQ type output then likely you need to create categories for anything that has a continuous measure like blood pressure, temperature or even age&amp;nbsp;as otherwise you are very likely to have too few counts in many cells for reliable analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Observation weight values need to be accounted for as well.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 15:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623089#M19879</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-02-07T15:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with splitting data and running Chi Square</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623126#M19887</link>
      <description>&lt;P&gt;If you still want to go with the proc freq analysis, I think you need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = SplitData1;
tables MI * Selected / chisq;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Variable Selected is created by proc surveyselect in the output dataset when you use option outall.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 17:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-splitting-data-and-running-Chi-Square/m-p/623126#M19887</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-02-07T17:50:42Z</dc:date>
    </item>
  </channel>
</rss>

