<?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: sas proc univariate with multiple continuous variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568226#M159902</link>
    <description>&lt;P&gt;1) You can transpose and use #BYVAL processing, as long as you don't need the variable name on the X axis:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=sashelp.class out=classList name=varName;
var age height weight;
by name sex notsorted;
run;

proc sort data=classList; by varname; run;

option nobyline;
title "Histogram for #byval1";
proc sgplot data=classList;
by varName;
histogram col1;
xaxis display=(nolabel); /* remove the "Col1" label */
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 23 Jun 2019 18:42:55 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-06-23T18:42:55Z</dc:date>
    <item>
      <title>sas proc univariate with multiple continuous variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568211#M159898</link>
      <description>&lt;DIV class="post-text"&gt;&lt;P&gt;I have questions about working with multiple columns using the &lt;CODE&gt;proc univariate&lt;/CODE&gt; statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I need to create histograms with the column header in the title, as such:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proc univariate data=data noprint;
   histogram var1; 
   title 'histogram for var1';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proc univariate data=data noprint;
   histogram;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will produce histograms for all continuous variables, but how to include the column header in the title?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) I need to replace extreme values of each continuous variable as missing value. I calculate the quartiles and IQR as such:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROC UNIVARIATE DATA = data NOPRINT;
OUTPUT OUT = boxStats p25 = p25 p75 = p75 QRANGE = iqr;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This saves the quartiles and IQR of the last column but not the remaining. Do I need to go through and create variables for each one? There is more than 20.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 23 Jun 2019 12:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568211#M159898</guid>
      <dc:creator>axescot78</dc:creator>
      <dc:date>2019-06-23T12:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc univariate with multiple continuous variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568226#M159902</link>
      <description>&lt;P&gt;1) You can transpose and use #BYVAL processing, as long as you don't need the variable name on the X axis:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=sashelp.class out=classList name=varName;
var age height weight;
by name sex notsorted;
run;

proc sort data=classList; by varname; run;

option nobyline;
title "Histogram for #byval1";
proc sgplot data=classList;
by varName;
histogram col1;
xaxis display=(nolabel); /* remove the "Col1" label */
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Jun 2019 18:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568226#M159902</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-23T18:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc univariate with multiple continuous variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568227#M159903</link>
      <description>&lt;P&gt;2) When you say OUTPUT p25=, you must specify a name list with a new name of every variable, such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OUTPUT out=... p25=age25 height25 weight25;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 18:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568227#M159903</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-23T18:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc univariate with multiple continuous variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568259#M159915</link>
      <description>&lt;P&gt;Because there are so many variables, the code would be long and convuluted. However, this is how far I got with it:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;/* Calculate Median and IQR */&lt;BR /&gt;PROC UNIVARIATE DATA = kddcup98(drop=TARGET_B) OUTTABLE= boxStats(keep=_VAR_ _Q1_ _Q3_ _QRANGE_) NOPRINT;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Calculate upper and lower bounds */&lt;BR /&gt;DATA boxStats;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; SET boxStats;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; upper_bound = _Q3_ + 1.5*_QRANGE_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lower_bound = _Q3_ - 1.5*_QRANGE_;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DATA kddcup98_continuous;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; SET kddcup98_continuous;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ARRAY Num_Col[*] _NUMERIC_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DO i = 1 to dim(Num_Col);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF Num_Col[i] &amp;gt; boxStats[i, "upper_bound"] OR Num_Col[i] &amp;lt; boxStats[i, "lower_bound"] THEN Num_Col[i] = .;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; END;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the main data table and a table of stats from which I computed upper and lower bounds. I need to reference those values from the boxStats table. How I can I reference those values?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 07:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568259#M159915</guid>
      <dc:creator>axescot78</dc:creator>
      <dc:date>2019-06-24T07:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc univariate with multiple continuous variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568404#M159994</link>
      <description>For #2 why do you need this? There may be other ways.</description>
      <pubDate>Mon, 24 Jun 2019 15:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568404#M159994</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T15:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc univariate with multiple continuous variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568529#M160053</link>
      <description>&lt;P&gt;I don't need it that specific way. Just trying to make SAS cooperate. I ended up getting it using symput and symget. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 20:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-proc-univariate-with-multiple-continuous-variables/m-p/568529#M160053</guid>
      <dc:creator>axescot78</dc:creator>
      <dc:date>2019-06-24T20:11:30Z</dc:date>
    </item>
  </channel>
</rss>

