<?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: percentile in sgplot in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/percentile-in-sgplot/m-p/483091#M71691</link>
    <description>&lt;P&gt;The basic approach would be to use another procedure such as proc means to generate the desired percentile of a variable similar to:&lt;/P&gt;
&lt;PRE&gt;proc means data=sashelp.class p10 p20;
  var height;
run;&lt;/PRE&gt;
&lt;P&gt;Look at the output and replace the values in the refline statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to automate then you get into macro coding to generate output from proc means, create macro variables and then reference the macro variables in the sgplot code.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Aug 2018 15:33:07 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-08-01T15:33:07Z</dc:date>
    <item>
      <title>percentile in sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/percentile-in-sgplot/m-p/483088#M71690</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SE guide 9.4. I'd like to modify the code below to replace the refline inputs with computed values of 10th percentile and 90th percentile.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I manipulate count&amp;nbsp;and then use the percentile variables in the sgplot below? Or, is there a better way?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=loco_20_0001_freq;
	scatter x=unit y=count / datalabel=unit;
	refline 22.7  / label="10%" LINEATTRS=(color=red);
	refline  31 / label="90%" LINEATTRS=(color=red);
	xaxis display=(nolabel noline noticks) 
		fitpolicy=rotate 
		valuesrotate=vertical;
	yaxis grid;
	title 'Incident Occurrences';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 15:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/percentile-in-sgplot/m-p/483088#M71690</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-08-01T15:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: percentile in sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/percentile-in-sgplot/m-p/483091#M71691</link>
      <description>&lt;P&gt;The basic approach would be to use another procedure such as proc means to generate the desired percentile of a variable similar to:&lt;/P&gt;
&lt;PRE&gt;proc means data=sashelp.class p10 p20;
  var height;
run;&lt;/PRE&gt;
&lt;P&gt;Look at the output and replace the values in the refline statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to automate then you get into macro coding to generate output from proc means, create macro variables and then reference the macro variables in the sgplot code.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 15:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/percentile-in-sgplot/m-p/483091#M71691</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-01T15:33:07Z</dc:date>
    </item>
  </channel>
</rss>

