<?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: Multiple Array in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270447#M53742</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;where are the values for the Q variables supposed to be?&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry. I just updated the data...Thanks for the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2016 21:34:32 GMT</pubDate>
    <dc:creator>_maldini_</dc:creator>
    <dc:date>2016-05-13T21:34:32Z</dc:date>
    <item>
      <title>Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270440#M53740</link>
      <description>&lt;P&gt;I am trying to create a dataset that contains a set of variables where values greater than or equal to the third quartile&amp;nbsp;and less than or equal to the first quartiles are deleted.&amp;nbsp;I'm inexperienced using arrays. The code below is just my best guess. No observations are written to the new dataset using this code. Any help would be appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt; input age weight height Q3_age Q1_age Q3_weight Q1_weight Q3_height Q1_height&lt;BR /&gt; ;&lt;BR /&gt; datalines;&lt;BR /&gt; 23 165 72 55 44 222 145 72 65&lt;BR /&gt; 45 222 65 55 44 222 145 72 65&lt;BR /&gt; 57 165 45 55 44 222 145 72 65&lt;BR /&gt; 44 156 80 55 44 222 145 72 65&lt;BR /&gt; 44 109 99 55 44 222 145 72 65&lt;BR /&gt; 55 118 37 55 44 222 145 72 65&lt;BR /&gt; 66 145 66 55 44 222 145 72 65&lt;BR /&gt; 76 444 56 55 44 222 145 72 65&lt;BR /&gt; 99 234 76 55 44 222 145 72 65&lt;BR /&gt; ;&lt;BR /&gt; run;
	
	DATA want; 
	SET have;
	
	ARRAY array_one (*)
	age
	weight
	height
	;
	
	ARRAY array_two (*) 
	Q3_age 
	Q1_age&lt;BR /&gt;        Q3_weight
	Q1_weight 
	Q3_height 
	Q1_height 
	;
	
	DO i=1 to DIM(array_one);
	IF array_one(i)GE array_two(i) THEN DELETE;
	IF array_one(i)LE array_two(i) THEN DELETE;
	END;
	DROP i;
	RUN;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 May 2016 22:12:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270440#M53740</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-05-15T22:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270441#M53741</link>
      <description>&lt;P&gt;where are the values for the Q variables supposed to be? Is that what you are asking for help on?&lt;/P&gt;
&lt;P&gt;Since they are missing in your data then in&amp;nbsp;this line of code:&lt;/P&gt;
&lt;P&gt;IF array_one(i) GE array_two(i) THEN DELETE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Array_one is ALWAYS &amp;gt; missing so everything is deleted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you may be looking to join every record in Have to a summary dataset this might be close to what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have;
   var _numeric_;
   output out=HaveSum q1= q3= /autoname;
run; 
	
proc sql;
   create table want as
   select a.*
   from have as a, havesum as b
   where (age between age_q1 and age_q3)
      and (weight between weight_q1 and weight_q3)
      and (height between height_q1 and height_q3)
   ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 May 2016 20:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270441#M53741</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-13T20:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270447#M53742</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;where are the values for the Q variables supposed to be?&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry. I just updated the data...Thanks for the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 21:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270447#M53742</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-05-13T21:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270456#M53747</link>
      <description>&lt;P&gt;If your goal is to compute trimmed means, standard errors, or confidence intervals, consider using &lt;STRONG&gt;proc univariate&lt;/STRONG&gt; with option &lt;STRONG&gt;trimmed=&amp;nbsp;&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 21:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270456#M53747</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-13T21:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270458#M53748</link>
      <description>&lt;P&gt;Why do you want to compare Weight (the second element of Array_one)&amp;nbsp;to the Q1_age (the second element array_two)?&lt;/P&gt;
&lt;P&gt;Unless you have a LARGE number of variables like this arrays aren't really helpful and the logic is going to be abysmal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 22:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270458#M53748</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-13T22:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270612#M53794</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;Why do you want to compare Weight (the second element of Array_one)&amp;nbsp;to the Q1_age (the second element array_two)&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't. I just wasn't sure how the array would work. I changed the order of the elements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have many more variables. The data included in the original post was just for example purposes.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 15:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270612#M53794</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-05-16T15:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270723#M53834</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats﻿&lt;/a&gt;&amp;nbsp;I'm not sure I understand the documentation on this function. If I wanted means w/o outliers (e.g. 1.5 x the Q3 and 1.5 x the Q1, how would I specify these parameters in the option?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect008.htm" target="_self"&gt;TRIMMED=values &amp;lt;(&amp;lt;TYPE=keyword&amp;gt; &amp;lt;ALPHA=&amp;gt;)&amp;gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TRIM=values &amp;lt;(&amp;lt;TYPE=keyword&amp;gt; &amp;lt;ALPHA=&amp;gt;)&amp;gt;&lt;BR /&gt;requests a table of trimmed means, where value specifies the number or the proportion of observations that PROC UNIVARIATE trims. If the value is the number of trimmed observations, must be between 0 and half the number of nonmissing observations. If value is a proportion between 0 and 1/2, the number of observations that PROC UNIVARIATE trims is the smallest integer that is greater than or equal to , where is the number of observations. To include confidence limits for the mean and the Student’s test in the table, you must use the default value of VARDEF=, which is DF. For details concerning the computation of trimmed means, see the section Trimmed Means. The TRIMMED= option does not apply if you use a WEIGHT statement.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 16:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270723#M53834</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-05-16T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270726#M53836</link>
      <description>&lt;P&gt;Trimmed= 0.05 would be a 5% trim, the Type controls which end (or both) to trim.&lt;/P&gt;
&lt;P&gt;Trimmed= 0.25 type=twosided&lt;/P&gt;
&lt;P&gt;I think is what you may be looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 16:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270726#M53836</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-16T16:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270746#M53838</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;, type= option controls the type of confidence interval that is computed, not the trimming. Trimming is always done symmetrically. I had to do a little test to confirm this, as the doc is ambiguous.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 18:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270746#M53838</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-16T18:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Array in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270808#M53853</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;, type= option controls the type of confidence interval that is computed, not the trimming. Trimming is always done symmetrically. I had to do a little test to confirm this, as the doc is ambiguous.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks for the heads up. I don't use arbitrarily&amp;nbsp;trimmed data and the documentation got me. I've always been skeptical of trimming since the first stats program I used in class where the professor also wrote the program (that we had to buy...) but that professor loved trimming data.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 22:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Array-in-SAS/m-p/270808#M53853</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-16T22:43:30Z</dc:date>
    </item>
  </channel>
</rss>

