<?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 Array? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/642891#M191843</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-04-25 121540.png" style="width: 977px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38695i76B99D6F90D2FE79/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-04-25 121540.png" alt="Annotation 2020-04-25 121540.png" /&gt;&lt;/span&gt;I have a data set with 3 families and each family has an income value for months 1-12. I'm trying to determine how many months each family had an income that was less than two thirds of the income of the previous month. To do that I want to find out which months had income that was less than two thirds the income of the previous months, then add them up. I figure an array would be easiest but I'm not totally sure how to set that up. I'll attach what the data set looks like. Any advice would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Apr 2020 16:16:56 GMT</pubDate>
    <dc:creator>matoma</dc:creator>
    <dc:date>2020-04-25T16:16:56Z</dc:date>
    <item>
      <title>Array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/642891#M191843</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-04-25 121540.png" style="width: 977px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38695i76B99D6F90D2FE79/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-04-25 121540.png" alt="Annotation 2020-04-25 121540.png" /&gt;&lt;/span&gt;I have a data set with 3 families and each family has an income value for months 1-12. I'm trying to determine how many months each family had an income that was less than two thirds of the income of the previous month. To do that I want to find out which months had income that was less than two thirds the income of the previous months, then add them up. I figure an array would be easiest but I'm not totally sure how to set that up. I'll attach what the data set looks like. Any advice would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 16:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/642891#M191843</guid>
      <dc:creator>matoma</dc:creator>
      <dc:date>2020-04-25T16:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array/m-p/642894#M191846</link>
      <description>&lt;P&gt;2/3 of the income of the previous month is not defined for the first month. So&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    array faminc faminc1-faminc9;
    sum=0;
    do i=2 to 9;
         if faminc(i)&amp;lt;faminc(i-1)*2/3 then sum=sum+faminc(i);
    end;
    drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 Apr 2020 16:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array/m-p/642894#M191846</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-25T16:21:00Z</dc:date>
    </item>
  </channel>
</rss>

