<?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: IF/THEN STATEMENTS: Multiple Conditions in an Array in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216496#M53305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked like a charm! Thank you RW9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like every time someone helps me figure out a problem on here I learn something new and very useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 14:31:30 GMT</pubDate>
    <dc:creator>daszlosek</dc:creator>
    <dc:date>2015-08-04T14:31:30Z</dc:date>
    <item>
      <title>IF/THEN STATEMENTS: Multiple Conditions in an Array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216494#M53303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a summary score based on eight dichotomous variables (labelled 1/2 instead of 0/1 since I am going to be doing my regression analysis in SUDAAN). Each of the variables has missing values and I would like my array to show that IF there are more than four missing values between the eight variables for a single observation THEN the observation is read as missing. Otherwise, if there are less than four missing values between the eight variables, then the score will be between 1-8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what my array looks like at the moment (a shoutout to PhilC for helping fix my array) and it works for giving me a sum score between 1-8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARRAY ACE_ARRAY[8]&amp;nbsp; ACEPRISN2 ACEDIVRC2 ACEDEPRS2 ACESXAB ACESUBS ACEPUNCH2 ACESWEAR2 ACEHURT2;&lt;/P&gt;&lt;P&gt;SUM_ACESCORE = 0; &lt;/P&gt;&lt;P&gt;do i=1 to 8; drop i;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SUM_ACESCORE+ACE_ARRAY&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you can use some type of IF/THEN statement in the DO loop to do this, but I cannot figure out how to signify "four or more missing values".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always Thank you guys for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Donald S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 14:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216494#M53303</guid>
      <dc:creator>daszlosek</dc:creator>
      <dc:date>2015-08-04T14:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: IF/THEN STATEMENTS: Multiple Conditions in an Array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216495#M53304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Correction, use the nmiss() function&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ARRAY ACE_ARRAY[8]&amp;nbsp; ACEPRISN2 ACEDIVRC2 ACEDEPRS2 ACESXAB ACESUBS ACEPUNCH2 ACESWEAR2 ACEHURT2;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SUM_ACESCORE = 0;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;d&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;o i=1 to 8; drop i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if nmiss(of ace_array{*})&amp;lt;4 then SUM_ACESCORE+ACE_ARRAY&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;end;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Also, try to use lower case in SAS code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 14:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216495#M53304</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-04T14:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: IF/THEN STATEMENTS: Multiple Conditions in an Array</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216496#M53305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked like a charm! Thank you RW9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like every time someone helps me figure out a problem on here I learn something new and very useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 14:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-STATEMENTS-Multiple-Conditions-in-an-Array/m-p/216496#M53305</guid>
      <dc:creator>daszlosek</dc:creator>
      <dc:date>2015-08-04T14:31:30Z</dc:date>
    </item>
  </channel>
</rss>

