<?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 How to calculate a total score taken into account a given amount of missing data. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509950#M137173</link>
    <description>&lt;P&gt;Hey.&lt;/P&gt;&lt;P&gt;I am a new user of SAS enterprise guide and are doing calculations on forgotten joint score (FJS), which consists of 12 questions, each with a score of 0-4. This makes it possible to score between 0-48 which is converted to a scale from 0-100 by dividing with the number of answered questions and multiplied by 25.&lt;/P&gt;&lt;P&gt;Example with a person scoring 40 points after completing 10 questions (i.e. 2 missing data): (40 point/(12-2))*25=100&lt;/P&gt;&lt;P&gt;Example with a person scoring 38 points after completing same number&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(38points/(12-2))*25=95&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My data consists of approximately 500 patients with different amount of missing data. In the score it is allowed to have missing data of up to 4 questions but not more than this.&lt;/P&gt;&lt;P&gt;I have already made my list with the patients who have a maximum of 4 missing data.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My question is: How do I make the sas-program&amp;nbsp;which calculates the score depending on the number of missing data. Hence the examples above it has to divide by 12 minus the number of missing data in the equation.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2018 16:33:26 GMT</pubDate>
    <dc:creator>Jabjolsen</dc:creator>
    <dc:date>2018-11-02T16:33:26Z</dc:date>
    <item>
      <title>How to calculate a total score taken into account a given amount of missing data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509950#M137173</link>
      <description>&lt;P&gt;Hey.&lt;/P&gt;&lt;P&gt;I am a new user of SAS enterprise guide and are doing calculations on forgotten joint score (FJS), which consists of 12 questions, each with a score of 0-4. This makes it possible to score between 0-48 which is converted to a scale from 0-100 by dividing with the number of answered questions and multiplied by 25.&lt;/P&gt;&lt;P&gt;Example with a person scoring 40 points after completing 10 questions (i.e. 2 missing data): (40 point/(12-2))*25=100&lt;/P&gt;&lt;P&gt;Example with a person scoring 38 points after completing same number&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(38points/(12-2))*25=95&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My data consists of approximately 500 patients with different amount of missing data. In the score it is allowed to have missing data of up to 4 questions but not more than this.&lt;/P&gt;&lt;P&gt;I have already made my list with the patients who have a maximum of 4 missing data.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My question is: How do I make the sas-program&amp;nbsp;which calculates the score depending on the number of missing data. Hence the examples above it has to divide by 12 minus the number of missing data in the equation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 16:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509950#M137173</guid>
      <dc:creator>Jabjolsen</dc:creator>
      <dc:date>2018-11-02T16:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a total score taken into account a given amount of missing data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509959#M137179</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214839"&gt;@Jabjolsen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey.&lt;/P&gt;
&lt;P&gt;I am a new user of SAS enterprise guide and are doing calculations on forgotten joint score (FJS), which consists of 12 questions, each with a score of 0-4. This makes it possible to score between 0-48 which is converted to a scale from 0-100 by dividing with the number of answered questions and multiplied by 25.&lt;/P&gt;
&lt;P&gt;Example with a person scoring 40 points after completing 10 questions (i.e. 2 missing data): (40 point/(12-2))*25=100&lt;/P&gt;
&lt;P&gt;Example with a person scoring 38 points after completing same number&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(38points/(12-2))*25=95&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;My data consists of approximately 500 patients with different amount of missing data. In the score it is allowed to have missing data of up to 4 questions but not more than this.&lt;/P&gt;
&lt;P&gt;I have already made my list with the patients who have a maximum of 4 missing data.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;My question is: How do I make the sas-program&amp;nbsp;which calculates the score depending on the number of missing data. Hence the examples above it has to divide by 12 minus the number of missing data in the equation.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Summary functions to the rescue&lt;/P&gt;
&lt;P&gt;I think something similar to this is what you are looking for:&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   array s score1-score12;
   if nmiss(of s(*)) le 4 then 
      fjs = ( sum(of s(*)) / n(of s(*)) )*25;
run;
&lt;/PRE&gt;
&lt;P&gt;Score1 to score12 would be replaced by your question variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The NMISS function counts missing, the SUM function adds, and the N function counts non-missing.&lt;/P&gt;
&lt;P&gt;The " of s(*) " says to use all of the elements of the array when calculating.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 16:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509959#M137179</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-02T16:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a total score taken into account a given amount of missing data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509975#M137184</link>
      <description>Thanks a lot for a good answer.! I will check if it works soon.</description>
      <pubDate>Fri, 02 Nov 2018 17:27:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-a-total-score-taken-into-account-a-given-amount/m-p/509975#M137184</guid>
      <dc:creator>Jabjolsen</dc:creator>
      <dc:date>2018-11-02T17:27:35Z</dc:date>
    </item>
  </channel>
</rss>

