<?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: How to write Proc Boxplot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/577150#M163514</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;PROC boxplot DATA = Costing ;&lt;BR /&gt;plot IDC*&lt;FONT color="#993300"&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;&lt;BR /&gt;(...)&lt;/P&gt;
&lt;P&gt;What would I specify as the unit in the plot statement?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You mean the &lt;EM&gt;group variable&lt;/EM&gt;. I think you would need to create a new variable with an arbitrary constant value in all observations (if there is no such variable in dataset &lt;FONT face="courier new,courier"&gt;Costing&lt;/FONT&gt;). This may be numeric or character (but not missing) and you could create it "on the fly" in a view:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _tmp / view=_tmp;
set costing;
retain _c 0;
run;

proc boxplot data=_tmp;
plot IDC*_c / boxstyle=schematic;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that by default (&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_boxplot_syntax06.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.boxplot.opt_boxstyle" target="_blank" rel="noopener"&gt;BOXSTYLE=&lt;/A&gt;SKELETAL) outliers would not be identified with a special symbol.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The alternative solutions that have been suggested are easier to use: You don't need a group variable and the "schematic" plot style is the default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With PROC UNIVARIATE the box plot comes in a panel together with other plots, which may or may not be convenient. The VBOX statement of PROC SGPLOT and the PLOT statement of PROC BOXPLOT are (in recent SAS releases) more flexible in terms of outlier definition: see options &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=n1waawwbez01ppn15dn9ehmxzihf.htm&amp;amp;locale=en#p0w49h7u2t06cfn1mfzn8t003auga" target="_blank" rel="noopener"&gt;WHISKERPCT=&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_boxplot_syntax06.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.boxplot.opt_whiskerpercentile" target="_blank" rel="noopener"&gt;WHISKERPERCENTILE=&lt;/A&gt;, respectively. Note that in addition to exploratory analyses using these definitions or the default (that is: values outside the&amp;nbsp;lower and upper fences) there exist many statistical tests for specific situations (e.g. tests for a lower and upper outlier-pair in a normal sample with unknown parameters, see statistical literature such as&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=imlug_robustregexpls_sect013.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#imlug_robustregexplsbarn_v94" target="_blank" rel="noopener"&gt;Barnett/Lewis&lt;/A&gt;).&lt;/P&gt;</description>
    <pubDate>Sat, 27 Jul 2019 12:22:30 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-07-27T12:22:30Z</dc:date>
    <item>
      <title>How to write Proc Boxplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576986#M163410</link>
      <description>&lt;P&gt;PROC boxplot DATA = Costing ;&lt;BR /&gt;plot IDC*&lt;FONT color="#993300"&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a boxplot to identify outliers in my data&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would I specify as the unit in the plot statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 17:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576986#M163410</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2019-07-26T17:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Proc Boxplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576991#M163415</link>
      <description>&lt;P&gt;Switch to SGPLOT&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=costing;
   vbox IDC;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jul 2019 17:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576991#M163415</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-07-26T17:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Proc Boxplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576995#M163417</link>
      <description>Summary of IDC Variable&lt;BR /&gt;&lt;BR /&gt;The UNIVARIATE Procedure&lt;BR /&gt;[Histogram for IDC]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;________________________________&lt;BR /&gt;Summary of IDC Variable&lt;BR /&gt;&lt;BR /&gt;The UNIVARIATE Procedure&lt;BR /&gt;Fitted Normal Distribution for IDC (IDC)&lt;BR /&gt;Parameters for Normal Distribution&lt;BR /&gt;Parameter&lt;BR /&gt;Symbol&lt;BR /&gt;Estimate&lt;BR /&gt;Mean&lt;BR /&gt;Mu&lt;BR /&gt;2627.593&lt;BR /&gt;Std Dev&lt;BR /&gt;Sigma&lt;BR /&gt;1840.645&lt;BR /&gt;&lt;BR /&gt;Goodness-of-Fit Tests for Normal Distribution&lt;BR /&gt;Test&lt;BR /&gt;Statistic&lt;BR /&gt;p Value&lt;BR /&gt;Kolmogorov-Smirnov&lt;BR /&gt;D&lt;BR /&gt;0.1759673&lt;BR /&gt;Pr &amp;gt; D&lt;BR /&gt;&amp;lt;0.010&lt;BR /&gt;Cramer-von Mises&lt;BR /&gt;W-Sq&lt;BR /&gt;2.7372742&lt;BR /&gt;Pr &amp;gt; W-Sq&lt;BR /&gt;&amp;lt;0.005&lt;BR /&gt;Anderson-Darling&lt;BR /&gt;A-Sq&lt;BR /&gt;15.7992854&lt;BR /&gt;Pr &amp;gt; A-Sq&lt;BR /&gt;&amp;lt;0.005&lt;BR /&gt;&lt;BR /&gt;Quantiles for Normal Distribution&lt;BR /&gt;Percent&lt;BR /&gt;Quantile&lt;BR /&gt;Observed&lt;BR /&gt;Estimated&lt;BR /&gt;1.0&lt;BR /&gt;0.40000&lt;BR /&gt;-1654.389&lt;BR /&gt;5.0&lt;BR /&gt;724.81000&lt;BR /&gt;-400.000&lt;BR /&gt;10.0&lt;BR /&gt;1161.90000&lt;BR /&gt;268.710&lt;BR /&gt;25.0&lt;BR /&gt;1665.96000&lt;BR /&gt;1386.096&lt;BR /&gt;50.0&lt;BR /&gt;2298.76500&lt;BR /&gt;2627.593&lt;BR /&gt;75.0&lt;BR /&gt;3007.88000&lt;BR /&gt;3869.089&lt;BR /&gt;90.0&lt;BR /&gt;4255.46000&lt;BR /&gt;4986.475&lt;BR /&gt;95.0&lt;BR /&gt;5150.47000&lt;BR /&gt;5655.185&lt;BR /&gt;99.0&lt;BR /&gt;10884.29000&lt;BR /&gt;6909.574&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;________________________________&lt;BR /&gt;[The SGPlot Procedure]&lt;BR /&gt;&lt;BR /&gt;Does this mean that so many obs are out;iers that are above the boxplot?&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jul 2019 17:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576995#M163417</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2019-07-26T17:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Proc Boxplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576996#M163418</link>
      <description>&lt;P&gt;I would call upon&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; for best advice possible&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 17:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/576996#M163418</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-07-26T17:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Proc Boxplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/577016#M163429</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;PROC boxplot DATA = Costing ;&lt;BR /&gt;plot IDC*&lt;FONT color="#993300"&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create a boxplot to identify outliers in my data&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What would I specify as the unit in the plot statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=costing plots;
var idc;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The PLOTS option causes a boxplot to be generated.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 18:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/577016#M163429</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-26T18:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Proc Boxplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/577150#M163514</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;PROC boxplot DATA = Costing ;&lt;BR /&gt;plot IDC*&lt;FONT color="#993300"&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;&lt;BR /&gt;(...)&lt;/P&gt;
&lt;P&gt;What would I specify as the unit in the plot statement?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You mean the &lt;EM&gt;group variable&lt;/EM&gt;. I think you would need to create a new variable with an arbitrary constant value in all observations (if there is no such variable in dataset &lt;FONT face="courier new,courier"&gt;Costing&lt;/FONT&gt;). This may be numeric or character (but not missing) and you could create it "on the fly" in a view:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _tmp / view=_tmp;
set costing;
retain _c 0;
run;

proc boxplot data=_tmp;
plot IDC*_c / boxstyle=schematic;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that by default (&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_boxplot_syntax06.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.boxplot.opt_boxstyle" target="_blank" rel="noopener"&gt;BOXSTYLE=&lt;/A&gt;SKELETAL) outliers would not be identified with a special symbol.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The alternative solutions that have been suggested are easier to use: You don't need a group variable and the "schematic" plot style is the default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With PROC UNIVARIATE the box plot comes in a panel together with other plots, which may or may not be convenient. The VBOX statement of PROC SGPLOT and the PLOT statement of PROC BOXPLOT are (in recent SAS releases) more flexible in terms of outlier definition: see options &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=n1waawwbez01ppn15dn9ehmxzihf.htm&amp;amp;locale=en#p0w49h7u2t06cfn1mfzn8t003auga" target="_blank" rel="noopener"&gt;WHISKERPCT=&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_boxplot_syntax06.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.boxplot.opt_whiskerpercentile" target="_blank" rel="noopener"&gt;WHISKERPERCENTILE=&lt;/A&gt;, respectively. Note that in addition to exploratory analyses using these definitions or the default (that is: values outside the&amp;nbsp;lower and upper fences) there exist many statistical tests for specific situations (e.g. tests for a lower and upper outlier-pair in a normal sample with unknown parameters, see statistical literature such as&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=imlug_robustregexpls_sect013.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#imlug_robustregexplsbarn_v94" target="_blank" rel="noopener"&gt;Barnett/Lewis&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 12:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-Proc-Boxplot/m-p/577150#M163514</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-07-27T12:22:30Z</dc:date>
    </item>
  </channel>
</rss>

