<?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 Defining a Arithmetic Expression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Defining-a-Arithmetic-Expression/m-p/436200#M282146</link>
    <description>&lt;P&gt;I am a SAS newbie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to calculate the person years at risk (personyrs) of an ethnic group being diagnosed with a disorder by age&amp;nbsp;group and gender for comparison with a standard population. What sort of expression would I use to calculate this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To calculated the unadjusted incidence rates, I used the following expression to calculate the person years of risk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=primhd.diagnoses;&lt;/P&gt;&lt;P&gt;var personyrs;&lt;/P&gt;&lt;P&gt;where disorder=1 and ethnicity=1;&lt;/P&gt;&lt;P&gt;sum personyrs;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a national data hence there is a massive number of observations. There has to be an easier way to calculate this without the resulting table with all the relevant observations.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To summarise all the variables of interest included to calculate the personyrs at risk:&lt;/P&gt;&lt;P&gt;disorder, ethnicity (boolean expressions for different disorders and ethnicities), agegrp and lastly gender&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 11:59:56 GMT</pubDate>
    <dc:creator>acelini</dc:creator>
    <dc:date>2018-02-12T11:59:56Z</dc:date>
    <item>
      <title>Defining a Arithmetic Expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-a-Arithmetic-Expression/m-p/436200#M282146</link>
      <description>&lt;P&gt;I am a SAS newbie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to calculate the person years at risk (personyrs) of an ethnic group being diagnosed with a disorder by age&amp;nbsp;group and gender for comparison with a standard population. What sort of expression would I use to calculate this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To calculated the unadjusted incidence rates, I used the following expression to calculate the person years of risk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=primhd.diagnoses;&lt;/P&gt;&lt;P&gt;var personyrs;&lt;/P&gt;&lt;P&gt;where disorder=1 and ethnicity=1;&lt;/P&gt;&lt;P&gt;sum personyrs;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a national data hence there is a massive number of observations. There has to be an easier way to calculate this without the resulting table with all the relevant observations.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To summarise all the variables of interest included to calculate the personyrs at risk:&lt;/P&gt;&lt;P&gt;disorder, ethnicity (boolean expressions for different disorders and ethnicities), agegrp and lastly gender&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 11:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-a-Arithmetic-Expression/m-p/436200#M282146</guid>
      <dc:creator>acelini</dc:creator>
      <dc:date>2018-02-12T11:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a Arithmetic Expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-a-Arithmetic-Expression/m-p/436209#M282147</link>
      <description>&lt;P&gt;Use proc means:&lt;/P&gt;
&lt;PRE&gt;proc means data=primhd.diagnoses (where=(disorder=1 and ethnicity=1));
  var personyrs disorder ethinicity agegrp gender;
  output out=want;
run;&lt;/PRE&gt;
&lt;P&gt;To get better answers post some sample test data in the form of a datastep, if you don't know how use this post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 13:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-a-Arithmetic-Expression/m-p/436209#M282147</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-12T13:22:35Z</dc:date>
    </item>
  </channel>
</rss>

