<?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: Generating a variable that indicate that person has missing data for more than  two variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827565#M81969</link>
    <description>&lt;P&gt;And what should happen if exactly 10 answers are correct?&lt;/P&gt;
&lt;P&gt;Posting data in usable form helps us to provide tested code.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 09:25:46 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2022-08-08T09:25:46Z</dc:date>
    <item>
      <title>Generating a variable that indicate that person has missing data for more than  two variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827548#M81967</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Students where requested to complete a survey but some students didn't answer all the questions (Question1 to Question12). The survey consist of 12 questions.&amp;nbsp; I want to create a variable&amp;nbsp; to flag ( variable name: complete)&amp;nbsp; students that didn't answer three or more questions from the survey.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The questions that are not answered are coded as missing&amp;nbsp; "."&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable names for the questions are question1 = item1, question2= item2,&amp;nbsp; question3= item3 etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if a student answered more than 10 questions then complete=1&lt;/LI&gt;&lt;LI&gt;If a student answered only 5 questions then complete = 0&lt;/LI&gt;&lt;LI&gt;If a student answered only 11 questions then complete = 1&lt;/LI&gt;&lt;LI&gt;If a student answered only 9 questions then complete = 0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your assistance in writing up the sas code. Through array?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sofia&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 07:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827548#M81967</guid>
      <dc:creator>Sofia2022</dc:creator>
      <dc:date>2022-08-08T07:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a variable that indicate that person has missing data for more than  two variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827549#M81968</link>
      <description>&lt;P&gt;Obviously, this is untested, since I can't see your data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   complete = (n(of item:) &amp;gt; 9);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Aug 2022 07:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827549#M81968</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-08-08T07:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a variable that indicate that person has missing data for more than  two variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827565#M81969</link>
      <description>&lt;P&gt;And what should happen if exactly 10 answers are correct?&lt;/P&gt;
&lt;P&gt;Posting data in usable form helps us to provide tested code.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 09:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Generating-a-variable-that-indicate-that-person-has-missing-data/m-p/827565#M81969</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-08-08T09:25:46Z</dc:date>
    </item>
  </channel>
</rss>

