<?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: Equation in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833956#M329710</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34666"&gt;@ursula&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With input data like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input SCr age sex $;
cards;
0.82 65 M
0.93 71 F
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you can compute eGFR according to your formula as follows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
if n(SCr, age)=2 then do;
       if sex='F' then eGFR=142*min(SCr/0.7,1)**-0.241*max(SCr/0.7,1)**-1.2*0.9938**age*1.012;
  else if sex='M' then eGFR=142*min(SCr/0.9,1)**-0.302*max(SCr/0.9,1)**-1.2*0.9938**age;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and, if you like to get external confirmation, compare a few results to those of the online calculator&amp;nbsp;&lt;A href="https://www.kidney.org/professionals/kdoqi/gfr_calculator" target="_blank"&gt;https://www.kidney.org/professionals/kdoqi/gfr_calculator&lt;/A&gt;&amp;nbsp;with&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Serum Cystatin C: left blank&lt;/LI&gt;
&lt;LI&gt;Standardized Assays: Yes&lt;/LI&gt;
&lt;LI&gt;Adjust for body surface area: No&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Sat, 17 Sep 2022 09:32:03 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2022-09-17T09:32:03Z</dc:date>
    <item>
      <title>Equation in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833947#M329708</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;is anybody able to help me of how to write the following equation in SAS?&lt;/P&gt;
&lt;P&gt;eGFR&lt;SUB&gt;cr&lt;/SUB&gt;&amp;nbsp;= 142 x min(S&lt;SUB&gt;cr&lt;/SUB&gt;/κ, 1)&lt;SUP&gt;α&lt;/SUP&gt;&amp;nbsp;x max(S&lt;SUB&gt;cr&lt;/SUB&gt;/κ, 1)&lt;SUP&gt;-1.200&lt;/SUP&gt;&amp;nbsp;x 0.9938&lt;SUP&gt;Age&lt;/SUP&gt;&amp;nbsp;x 1.012 [if female]&lt;/P&gt;
&lt;P&gt;where:&lt;/P&gt;
&lt;P&gt;S&lt;SUB&gt;cr&lt;/SUB&gt;&amp;nbsp;= standardized serum creatinine in mg/dL&lt;/P&gt;
&lt;P&gt;κ = 0.7 (females) or 0.9 (males)&lt;/P&gt;
&lt;P&gt;α = -0.241 (female) or -0.302 (male)&lt;/P&gt;
&lt;P&gt;min(S&lt;SUB&gt;cr&lt;/SUB&gt;/κ, 1) is the minimum of S&lt;SUB&gt;cr&lt;/SUB&gt;/κ or 1.0&lt;/P&gt;
&lt;P&gt;max(S&lt;SUB&gt;cr&lt;/SUB&gt;/κ, 1) is the maximum of S&lt;SUB&gt;cr&lt;/SUB&gt;/κ or 1.0&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Age (years)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 04:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833947#M329708</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2022-09-17T04:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Equation in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833956#M329710</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34666"&gt;@ursula&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With input data like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input SCr age sex $;
cards;
0.82 65 M
0.93 71 F
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you can compute eGFR according to your formula as follows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
if n(SCr, age)=2 then do;
       if sex='F' then eGFR=142*min(SCr/0.7,1)**-0.241*max(SCr/0.7,1)**-1.2*0.9938**age*1.012;
  else if sex='M' then eGFR=142*min(SCr/0.9,1)**-0.302*max(SCr/0.9,1)**-1.2*0.9938**age;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and, if you like to get external confirmation, compare a few results to those of the online calculator&amp;nbsp;&lt;A href="https://www.kidney.org/professionals/kdoqi/gfr_calculator" target="_blank"&gt;https://www.kidney.org/professionals/kdoqi/gfr_calculator&lt;/A&gt;&amp;nbsp;with&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Serum Cystatin C: left blank&lt;/LI&gt;
&lt;LI&gt;Standardized Assays: Yes&lt;/LI&gt;
&lt;LI&gt;Adjust for body surface area: No&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 17 Sep 2022 09:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833956#M329710</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-09-17T09:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Equation in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833986#M329723</link>
      <description>&lt;P&gt;Thank you so much for your help!&lt;/P&gt;
&lt;P&gt;I really appreciate for the prompt response!&lt;/P&gt;
&lt;P&gt;Have a great weekend!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 18:22:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833986#M329723</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2022-09-17T18:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Equation in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833987#M329724</link>
      <description>&lt;P&gt;sorry , I have a tiny quick question about the code from you.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data want;
set have;
if n(SCr, age)=2 then do;
       if sex='F' then eGFR=142*min(SCr/0.7,1)**-0.241*max(SCr/0.7,1)**-1.2*0.9938**age*1.012;
  else if sex='M' then eGFR=142*min(SCr/0.9,1)**-0.302*max(SCr/0.9,1)**-1.2*0.9938**age;
end;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what does the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;"&lt;FONT color="#FF0000"&gt;n&lt;/FONT&gt;"&lt;/STRONG&gt;&lt;/FONT&gt; ( if n(SCr, age) = 2 then do:) mean?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 18:44:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833987#M329724</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2022-09-17T18:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Equation in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833988#M329725</link>
      <description>Study the documentation of the N Function&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/lefunctionsref/n0h1d8gxwr1ml7n1qdt35v3i6u7r.htm" target="_blank"&gt;https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/lefunctionsref/n0h1d8gxwr1ml7n1qdt35v3i6u7r.htm&lt;/A&gt;</description>
      <pubDate>Sat, 17 Sep 2022 19:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833988#M329725</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-09-17T19:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Equation in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833989#M329726</link>
      <description>Thanks much!  got it now !</description>
      <pubDate>Sat, 17 Sep 2022 19:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equation-in-SAS/m-p/833989#M329726</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2022-09-17T19:31:53Z</dc:date>
    </item>
  </channel>
</rss>

