<?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: ENDPOINTS in PROC UNIVARIATE Doesn't work in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547014#M17956</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173881"&gt;@Junyong&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think this is the only way. As you mentioned, I may need (1) the sample statistics from the full data and (2) the histograms from the partial data—so NOPRINT suppresses many unwanted numbers in (2). Thanks, but in (1), can I suppress unnecessary histograms? This is the example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;resetline;
dm"log;clear;output;clear;graph;end;odsresult;clear;";
option nodate nonumber ls=128 ps=max;
proc datasets lib=work kill nolist;
run;
data _01;
do i=1 to 5000;
x=rand("t",3);
output;
end;
run;
ods select none;
ods results=off;
ods output GoodnessOfFit=_02;
proc univariate data=_01;
var x;
&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;histogram/normal(mu=0,sigma=1); &lt;/FONT&gt;&lt;FONT color="#ff0000" size="5"&gt;&amp;lt;=Delete this line if you don't want a histogram. 
&lt;/FONT&gt;&lt;/STRONG&gt;run;
ods results=on;
ods select all;
proc univariate data=_01 noprint;
var x;
where -5&amp;lt;x&amp;lt;5;
histogram/normal(mu=0,sigma=1,noprint) endpoints=-5 to 5 by 0.25;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;While the second UNIVARIATE just produces the histogram I need, the first UNIVARIATE produces both the full sample statistics and the ugly histogram. For the second one, I need to include HISTOGRAM/NORMAL(MU=0,SIGMA=1) to do Kolmogorov–Smirnov, Anderson–Darling, etc. with N(μ=0,σ²=1)—it seems NORMAL in the UNIVARIATE statement just selects the parameters automatically. Is there any similar way such as NOPRINT that suppresses not the tables but the histograms? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Highlighting apparently doesn't work in "running man" code boxes so here:&lt;/P&gt;
&lt;PRE&gt;proc univariate data=_01;
var x;
histogram/normal(mu=0,sigma=1); &lt;FONT color="#ff0000" size="5"&gt;&lt;STRONG&gt;&amp;lt;=Delete this line if you don't want a histogram. 
&lt;/STRONG&gt;&lt;/FONT&gt;run;
&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Mar 2019 21:57:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-03-29T21:57:09Z</dc:date>
    <item>
      <title>ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546744#M17946</link>
      <description>&lt;P&gt;I am drawing multiple histograms using PROC UNIVARIATE as follows. Drawing the histograms, I impose ENDPOINTS to limit the domain and better compare the resulting histograms. Here is the working example.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
do s=1 to 10;
do i=1 to 5000;
x=rand("t",3);
output;
end;
end;
run;
ods listing gpath='%SystemDrive%\Users\%USERNAME%\Desktop\';
ods graphics on;
axis1 order=(0 to 0.25 by 0.05) minor=none;
proc univariate;
var x;
by s;
histogram/normal(mu=0,sigma=1)
    vaxis=axis1
    vscale=proportion
    endpoints=-5 to 5 by 0.5;
run;
ods graphics off;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sadly, SAS ignores ENDPOINTS when there are outliers. The code above spits out the following unstable images with respective domains instead.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Histogram.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28278i841CD8C94F00C828/image-size/small?v=v2&amp;amp;px=200" role="button" title="Histogram.png" alt="Histogram.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Histogram1.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28280i6B94CDD1C9BEBBCB/image-size/small?v=v2&amp;amp;px=200" role="button" title="Histogram1.png" alt="Histogram1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Histogram2.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28277i061C60BD8510E450/image-size/small?v=v2&amp;amp;px=200" role="button" title="Histogram2.png" alt="Histogram2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is WHERE -5&amp;lt;x&amp;lt;5 the only way here? Can I rather force ENDPOINTS to work and detour WHERE? Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 22:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546744#M17946</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2019-03-27T22:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546747#M17947</link>
      <description>&lt;P&gt;What does the log say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For what you want, you may need SGPLOT instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173881"&gt;@Junyong&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am drawing multiple histograms using PROC UNIVARIATE as follows. Drawing the histograms, I impose ENDPOINTS to limit the domain and better compare the resulting histograms. Here is the working example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
do s=1 to 10;
do i=1 to 5000;
x=rand("t",3);
output;
end;
end;
run;
ods listing gpath='%SystemDrive%\Users\%USERNAME%\Desktop\';
ods graphics on;
axis1 order=(0 to 0.25 by 0.05) minor=none;
proc univariate;
var x;
by s;
histogram/normal(mu=0,sigma=1)
    vaxis=axis1
    vscale=proportion
    endpoints=-5 to 5 by 0.5;
run;
ods graphics off;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Sadly, SAS ignores ENDPOINTS when there are outliers. The code above spits out the following unstable images with respective domains instead.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Histogram.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28278i841CD8C94F00C828/image-size/small?v=v2&amp;amp;px=200" role="button" title="Histogram.png" alt="Histogram.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Histogram1.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28280i6B94CDD1C9BEBBCB/image-size/small?v=v2&amp;amp;px=200" role="button" title="Histogram1.png" alt="Histogram1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Histogram2.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28277i061C60BD8510E450/image-size/small?v=v2&amp;amp;px=200" role="button" title="Histogram2.png" alt="Histogram2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is WHERE -5&amp;lt;x&amp;lt;5 the only way here? Can I rather force ENDPOINTS to work and detour WHERE? Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 22:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546747#M17947</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-27T22:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546951#M17953</link>
      <description>&lt;P&gt;If the main concern is the histogram fitting in your desired range:&lt;/P&gt;
&lt;PRE&gt;proc univariate data=temp noprint;
where -5 le x le 5;
var x;
by s;
histogram/normal(mu=0,sigma=1 noprint)
    vaxis=axis1
    vscale=proportion
    endpoints=-5 to 5 by 0.5;
run;&lt;/PRE&gt;
&lt;P&gt;If you want the tabular summary to reflect the full&amp;nbsp;data then do not use the histogram in one call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above example does not print the tables associated with the proc or the histogram. Remove the NOPRINT if you want the tables.&lt;/P&gt;
&lt;P&gt;Be aware that the tables will be filtered by the WHERE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use Proc SGPLOT or SGPANEL&amp;nbsp;where there are more controls available&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 16:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546951#M17953</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-28T16:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546970#M17954</link>
      <description>&lt;P&gt;It's not clear to me how you want to handle the observations outside of [-5, 5].&amp;nbsp; If you want to omit them, then, yes, use the WHERE clause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation&amp;nbsp;for the ENDPOINTS= option says "&lt;/P&gt;
&lt;P&gt;The range of endpoints must cover the range of the data. For example, if you specify&lt;/P&gt;
&lt;PRE class="xisDoc-code"&gt;endpoints=2 to 10 by 2
&lt;/PRE&gt;
&lt;P&gt;then all of the observations must fall in the intervals [2,4) [4,6) [6,8) [8,10].&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the data do not fall within the range of the endpoints, the endpoints list is extended until there is a bin for all observations.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 17:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546970#M17954</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-28T17:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546983#M17955</link>
      <description>&lt;P&gt;I think this is the only way. As you mentioned, I may need (1) the sample statistics from the full data and (2) the histograms from the partial data—so NOPRINT suppresses many unwanted numbers in (2). Thanks, but in (1), can I suppress unnecessary histograms? This is the example.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;resetline;
dm"log;clear;output;clear;graph;end;odsresult;clear;";
option nodate nonumber ls=128 ps=max;
proc datasets lib=work kill nolist;
run;
data _01;
do i=1 to 5000;
x=rand("t",3);
output;
end;
run;
ods select none;
ods results=off;
ods output GoodnessOfFit=_02;
proc univariate data=_01;
var x;
histogram/normal(mu=0,sigma=1);
run;
ods results=on;
ods select all;
proc univariate data=_01 noprint;
var x;
where -5&amp;lt;x&amp;lt;5;
histogram/normal(mu=0,sigma=1,noprint) endpoints=-5 to 5 by 0.25;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;While the second UNIVARIATE just produces the histogram I need, the first UNIVARIATE produces both the full sample statistics and the ugly histogram. For the second one, I need to include HISTOGRAM/NORMAL(MU=0,SIGMA=1) to do Kolmogorov–Smirnov, Anderson–Darling, etc. with N(μ=0,σ²=1)—it seems NORMAL in the UNIVARIATE statement just selects the parameters automatically. Is there any similar way such as NOPRINT that suppresses not the tables but the histograms? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 18:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/546983#M17955</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2019-03-28T18:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547014#M17956</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173881"&gt;@Junyong&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think this is the only way. As you mentioned, I may need (1) the sample statistics from the full data and (2) the histograms from the partial data—so NOPRINT suppresses many unwanted numbers in (2). Thanks, but in (1), can I suppress unnecessary histograms? This is the example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;resetline;
dm"log;clear;output;clear;graph;end;odsresult;clear;";
option nodate nonumber ls=128 ps=max;
proc datasets lib=work kill nolist;
run;
data _01;
do i=1 to 5000;
x=rand("t",3);
output;
end;
run;
ods select none;
ods results=off;
ods output GoodnessOfFit=_02;
proc univariate data=_01;
var x;
&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;histogram/normal(mu=0,sigma=1); &lt;/FONT&gt;&lt;FONT color="#ff0000" size="5"&gt;&amp;lt;=Delete this line if you don't want a histogram. 
&lt;/FONT&gt;&lt;/STRONG&gt;run;
ods results=on;
ods select all;
proc univariate data=_01 noprint;
var x;
where -5&amp;lt;x&amp;lt;5;
histogram/normal(mu=0,sigma=1,noprint) endpoints=-5 to 5 by 0.25;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;While the second UNIVARIATE just produces the histogram I need, the first UNIVARIATE produces both the full sample statistics and the ugly histogram. For the second one, I need to include HISTOGRAM/NORMAL(MU=0,SIGMA=1) to do Kolmogorov–Smirnov, Anderson–Darling, etc. with N(μ=0,σ²=1)—it seems NORMAL in the UNIVARIATE statement just selects the parameters automatically. Is there any similar way such as NOPRINT that suppresses not the tables but the histograms? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Highlighting apparently doesn't work in "running man" code boxes so here:&lt;/P&gt;
&lt;PRE&gt;proc univariate data=_01;
var x;
histogram/normal(mu=0,sigma=1); &lt;FONT color="#ff0000" size="5"&gt;&lt;STRONG&gt;&amp;lt;=Delete this line if you don't want a histogram. 
&lt;/STRONG&gt;&lt;/FONT&gt;run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 21:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547014#M17956</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-29T21:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547046#M17957</link>
      <description>I do need the line for the normality tests such as Kolmogorov–Smirnov. I just need to suppress those ugly histograms (byproducts) from the first UNIVARIATE as the second UNIVARIATE creates what I need.</description>
      <pubDate>Thu, 28 Mar 2019 21:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547046#M17957</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2019-03-28T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: ENDPOINTS in PROC UNIVARIATE Doesn't work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547048#M17958</link>
      <description>Use ODS SELECT &amp;lt;outputName&amp;gt; to control the output.</description>
      <pubDate>Thu, 28 Mar 2019 21:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ENDPOINTS-in-PROC-UNIVARIATE-Doesn-t-work/m-p/547048#M17958</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-28T21:58:26Z</dc:date>
    </item>
  </channel>
</rss>

