<?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: PROC UNIVARIATE with multiple columns for different variables. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-UNIVARIATE-with-multiple-columns-for-different-variables/m-p/727723#M226401</link>
    <description>&lt;P&gt;In your code, you have one binary categorical variable (Married=0|1) and two continuous variables. Are you saying that you want a panel that have each continuous variable in a separate column, and the rows are the levels of Married?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, convert the data from wide to long and use PROC SGPANEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data BWeightLong;
set Sashelp.BWeight(keep=Married Weight MomWtGain);
VarName = "Weight   "; Value = Weight;    output;
VarName = "MonWtGain"; Value = MomWtGain; output;
keep Married VarName Value;
run;


proc sgpanel data=BWeightLong;
panelBy VarName Married / layout=lattice uniscale=row;
histogram Value;
density Value;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Mar 2021 10:42:10 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2021-03-19T10:42:10Z</dc:date>
    <item>
      <title>PROC UNIVARIATE with multiple columns for different variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-UNIVARIATE-with-multiple-columns-for-different-variables/m-p/727496#M226287</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have multiple univariate histograms that I would like to set next to each other and I can't for the life of me find a way to do so. Attached is the code I am using for an example along with the graphs it creates. I've tried proc sgpanel but I keep getting the same problem.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is ultimately to have a 2x2 set of graphs with the same class variable on the left.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 17:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-UNIVARIATE-with-multiple-columns-for-different-variables/m-p/727496#M226287</guid>
      <dc:creator>Sergio_Mora0713</dc:creator>
      <dc:date>2021-03-18T17:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC UNIVARIATE with multiple columns for different variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-UNIVARIATE-with-multiple-columns-for-different-variables/m-p/727723#M226401</link>
      <description>&lt;P&gt;In your code, you have one binary categorical variable (Married=0|1) and two continuous variables. Are you saying that you want a panel that have each continuous variable in a separate column, and the rows are the levels of Married?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, convert the data from wide to long and use PROC SGPANEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data BWeightLong;
set Sashelp.BWeight(keep=Married Weight MomWtGain);
VarName = "Weight   "; Value = Weight;    output;
VarName = "MonWtGain"; Value = MomWtGain; output;
keep Married VarName Value;
run;


proc sgpanel data=BWeightLong;
panelBy VarName Married / layout=lattice uniscale=row;
histogram Value;
density Value;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Mar 2021 10:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-UNIVARIATE-with-multiple-columns-for-different-variables/m-p/727723#M226401</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-19T10:42:10Z</dc:date>
    </item>
  </channel>
</rss>

