<?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 Implementing the fomula in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481810#M124711</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have tried with the formula but I get a partial output.&lt;/P&gt;&lt;P&gt;By using the sample data set please proceed with the formula code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input age bmi diab diab_bln$ alt ast plat albu;
cards;
61.3	25.43252595	1	no	22	18	3.29	3.2
74.4	30.04768905	2	yes	23	17	2.29	4.2
70.4	24.26987561	22	yes	19	21	2.98	4.4
56.4	38.17497196	5	no	33	25	1.97	4.4
75.4	40.96495221	2	yes	49	103	1.84	3.2
69.4	21.60288505	8	no	16	15	2.64	4.1
run;
proc print;
run;&lt;BR /&gt;&lt;BR /&gt;/*Apart from 2 and 22, whatever the value on diab column it should be NO in diab_bln column*/&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
Score = 	
	-1.675+(0.037*age)+(0.094*bmi)+(1.13*(diab_bln = ifn(diab_bln='yes')* 1)) +
(0.99*AST/ALT) - (0.013*plat) - (0.66*albu);
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the exact formula:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAFLD Score = -1.675 + (0.037*age[years]) + (0.094*BMI) + (1.13*diab [yes = 1, no = 0]) + (0.99*AST/ALT ratio) – (0.013*platelet count [×109/L]) – (0.66*albumin)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may get any answer by using the formula but&amp;nbsp;&lt;/P&gt;&lt;P&gt;To cross check the result, The given link will use to verify the score value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://qxmd.com/calculate/calculator_341/nafld-fibrosis-score" target="_blank"&gt;https://qxmd.com/calculate/calculator_341/nafld-fibrosis-score&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thanks in advance!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jul 2018 10:48:03 GMT</pubDate>
    <dc:creator>Sathish_jammy</dc:creator>
    <dc:date>2018-07-27T10:48:03Z</dc:date>
    <item>
      <title>Implementing the fomula in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481810#M124711</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have tried with the formula but I get a partial output.&lt;/P&gt;&lt;P&gt;By using the sample data set please proceed with the formula code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input age bmi diab diab_bln$ alt ast plat albu;
cards;
61.3	25.43252595	1	no	22	18	3.29	3.2
74.4	30.04768905	2	yes	23	17	2.29	4.2
70.4	24.26987561	22	yes	19	21	2.98	4.4
56.4	38.17497196	5	no	33	25	1.97	4.4
75.4	40.96495221	2	yes	49	103	1.84	3.2
69.4	21.60288505	8	no	16	15	2.64	4.1
run;
proc print;
run;&lt;BR /&gt;&lt;BR /&gt;/*Apart from 2 and 22, whatever the value on diab column it should be NO in diab_bln column*/&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
Score = 	
	-1.675+(0.037*age)+(0.094*bmi)+(1.13*(diab_bln = ifn(diab_bln='yes')* 1)) +
(0.99*AST/ALT) - (0.013*plat) - (0.66*albu);
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the exact formula:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAFLD Score = -1.675 + (0.037*age[years]) + (0.094*BMI) + (1.13*diab [yes = 1, no = 0]) + (0.99*AST/ALT ratio) – (0.013*platelet count [×109/L]) – (0.66*albumin)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may get any answer by using the formula but&amp;nbsp;&lt;/P&gt;&lt;P&gt;To cross check the result, The given link will use to verify the score value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://qxmd.com/calculate/calculator_341/nafld-fibrosis-score" target="_blank"&gt;https://qxmd.com/calculate/calculator_341/nafld-fibrosis-score&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thanks in advance!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 10:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481810#M124711</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2018-07-27T10:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing the fomula in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481812#M124713</link>
      <description>&lt;P&gt;Hint: always do a test run of your example data code, to make sure that it works (see the infile statement I had to add)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are overcomplicating the check for yes/no, try this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards dlm='09'x;
input age bmi diab diab_bln$ alt ast plat albu;
cards;
61.3	25.43252595	1	no	22	18	3.29	3.2
74.4	30.04768905	2	yes	23	17	2.29	4.2
70.4	24.26987561	22	yes	19	21	2.98	4.4
56.4	38.17497196	5	no	33	25	1.97	4.4
75.4	40.96495221	2	yes	49	103	1.84	3.2
69.4	21.60288505	8	no	16	15	2.64	4.1
run;

data want;
set have;
Score = 	
	-1.675+(0.037*age)+(0.094*bmi)+(1.13*(diab_bln = 'yes')) +
(0.99*AST/ALT) - (0.013*plat) - (0.66*albu);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 10:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481812#M124713</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-27T10:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing the fomula in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481830#M124719</link>
      <description>&lt;P&gt;And you may consider breaking up the formula into separate lines so that the single blocks are easier to read:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
Score =	
  -1.675 +
  (0.037*age) +
  (0.094*bmi) +
  (1.13*(diab_bln = 'yes')) +
  (0.99*AST/ALT) -
  (0.013*plat) -
  (0.66*albu)
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 11:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Implementing-the-fomula-in-sas/m-p/481830#M124719</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-27T11:40:18Z</dc:date>
    </item>
  </channel>
</rss>

