<?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 Request for guidance in analysing this data in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Request-for-guidance-in-analysing-this-data/m-p/946199#M42487</link>
    <description>&lt;P&gt;How can I create new variables, I have attached the dataset.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;what is the prevalence&amp;nbsp; of hypertension in the class? (Systolic &amp;gt;120 and Diastolic &amp;gt;90&lt;/LI&gt;&lt;LI&gt;What is the&amp;nbsp; prevalence of high cholesterol in the class (cholesterol ≥240)?&lt;/LI&gt;&lt;LI&gt;What is the prevalence of&amp;nbsp; diabetes in the class (glucose ≥126)?&lt;/LI&gt;&lt;LI&gt;What&amp;nbsp; is the&amp;nbsp; prevalence of obese (&lt;STRONG&gt;BMI&lt;/STRONG&gt;) ≥30,&amp;nbsp; based on height and weight in&amp;nbsp;&lt;STRONG&gt;inches&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;1=Female and 2=Male&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Calculate the prevalence of hypertension, diabetes, high cholesterol, and obesity by&amp;nbsp;&lt;STRONG&gt;Sex&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Thu, 03 Oct 2024 21:04:15 GMT</pubDate>
    <dc:creator>Ossy</dc:creator>
    <dc:date>2024-10-03T21:04:15Z</dc:date>
    <item>
      <title>Request for guidance in analysing this data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Request-for-guidance-in-analysing-this-data/m-p/946199#M42487</link>
      <description>&lt;P&gt;How can I create new variables, I have attached the dataset.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;what is the prevalence&amp;nbsp; of hypertension in the class? (Systolic &amp;gt;120 and Diastolic &amp;gt;90&lt;/LI&gt;&lt;LI&gt;What is the&amp;nbsp; prevalence of high cholesterol in the class (cholesterol ≥240)?&lt;/LI&gt;&lt;LI&gt;What is the prevalence of&amp;nbsp; diabetes in the class (glucose ≥126)?&lt;/LI&gt;&lt;LI&gt;What&amp;nbsp; is the&amp;nbsp; prevalence of obese (&lt;STRONG&gt;BMI&lt;/STRONG&gt;) ≥30,&amp;nbsp; based on height and weight in&amp;nbsp;&lt;STRONG&gt;inches&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;1=Female and 2=Male&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Calculate the prevalence of hypertension, diabetes, high cholesterol, and obesity by&amp;nbsp;&lt;STRONG&gt;Sex&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 03 Oct 2024 21:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Request-for-guidance-in-analysing-this-data/m-p/946199#M42487</guid>
      <dc:creator>Ossy</dc:creator>
      <dc:date>2024-10-03T21:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Request for guidance in analysing this data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Request-for-guidance-in-analysing-this-data/m-p/946201#M42488</link>
      <description>&lt;P&gt;Since we do not have your spreadsheet file that code to Import it does not provide a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sounds like class work. What have you done so far?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A data step is typically used to perform conditional actions like adding a variable to indicate some is "true" or not in a data step. With two variable you use an IF statement that uses both variables and the boundary value to test and set the value of a new variable to indicate if the comparison is of the level of interest or not, typically numeric 1 or zero for true or false. An example:&lt;/P&gt;
&lt;PRE&gt;If var1&amp;gt;somevalue and var2&amp;gt;differentvalue then newvar=1;
else newvar=0;&lt;/PRE&gt;
&lt;P&gt;Comparisons might be =, &amp;lt; , &amp;gt; or GE (greater than or equal) or LE (less than or equal).&lt;/P&gt;
&lt;P&gt;Same with single variables but only one comparison is needed.&lt;/P&gt;
&lt;PRE&gt;If othervariable le 16 then anewvariable is 1;
else 0;&lt;/PRE&gt;
&lt;P&gt;Or you can use syntax of Newvariable = (comparison code) as SAS will return 1 for true and 0 for false.&lt;/P&gt;
&lt;PRE&gt;HighChol = (Cholesterol ge 240);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Were you provided a formula to calculate BMI? Calculate BMI and then the same sort of comparison.&lt;/P&gt;
&lt;P&gt;After you have the new variables then use Proc freq with a tables that has Sex * condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example with the SASHELP.Class data set:&lt;/P&gt;
&lt;PRE&gt;Proc freq data=sashelp.class;
   tables sex* age;
run;&lt;/PRE&gt;
&lt;P&gt;You will get counts and percentages, overall, row and column of each level of sex compared with each level of age.&lt;/P&gt;
&lt;P&gt;When you want to have multiple variables compared use () to group lists:&lt;/P&gt;
&lt;PRE&gt;tables sex * (highchol obese hypertension diabetes);&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Oct 2024 21:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Request-for-guidance-in-analysing-this-data/m-p/946201#M42488</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-10-03T21:57:17Z</dc:date>
    </item>
  </channel>
</rss>

