<?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 - Percentiles in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205489#M51176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I'm not really grasping the problem here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run PROC UNIVARIATE, you can obtain the estimates of the lognormal coefficients. Use ODS OUTPUT PARAMETERESTIMATES=PARAMS; This will give you a SAS data set with the estimates of the Lognormal distribution. From there, you program the distribution using the Lognormal formula, in a SAS data step to determine the 99%-ile point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As stated in the SAS documentation (click to enlarge so it is readable):&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="10200" alt="SAS Help and Documentation_2015-04-29_10-52-52.gif" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/10200_SAS Help and Documentation_2015-04-29_10-52-52.gif" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Apr 2015 14:54:08 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2015-04-29T14:54:08Z</dc:date>
    <item>
      <title>Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205482#M51169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nHi everyone. This is my first post. First of all, it is good to be part of this Community!&lt;/P&gt;&lt;P&gt;I have a problem with sas coding. I want to fit a distribution (eg Normal or Lognormal) to some data and take the percentiles. I am using the following code which is fine.&lt;/P&gt;&lt;P&gt;My problem is that i want to extract the P99 of the fitted data at a sas data and not only at the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;PROC&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;UNIVARIATE&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; = WORK.TEMP1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;NOPRINT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; ;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 10pt; font-family: Courier New;"&gt;*pctldef=5;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; RESERVING_LOB_LOCAL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;VAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; log_max_incurred;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;HISTOGRAM&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; log_max_incurred /&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;NOPLOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;LOGNORMAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;W&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;L&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;COLOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=YELLOW&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;ZETA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=EST &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;THETA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;SIGMA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=EST);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=FINAL2 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;p99&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=P99 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;By doing this i save at the sas data "final2" only the p99 of the actual data and not of the fitted data too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Can you please help me?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Thank you very much in advance! Vasilis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 13:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205482#M51169</guid>
      <dc:creator>Vasilis</dc:creator>
      <dc:date>2015-04-28T13:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205483#M51170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have to use the OUTHIST= option to get that (and it may not be exactly the 99 percentile). You could always take the estimated coefficients of the Lognormal model and compute exactly where the 99 percentile is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 14:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205483#M51170</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-04-28T14:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205484#M51171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, i will try the outhistogram option. However, i would like to get the exact 99 percentile of the fitted data. Can you please give me some more help about yur second proposal? Maybe i don't understand very well but how can i calculate the estimated coefficients?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 14:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205484#M51171</guid>
      <dc:creator>Vasilis</dc:creator>
      <dc:date>2015-04-28T14:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205485#M51172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure . Did you check PPPlot or QQPlot statement ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 13:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205485#M51172</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-04-29T13:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205486#M51173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Vasilis wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks, i will try the outhistogram option. However, i would like to get the exact 99 percentile of the fitted data. Can you please give me some more help about yur second proposal? Maybe i don't understand very well but how can i calculate the estimated coefficients?&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;You are specifying a lognormal distribution, and the parameter estimates are calculated by PROC UNIVARIATE, so then you should program the lognormal distribution in a DATA step or otherwise, using these parameters, and find the exact 99%-lie point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or as Xia Keshan said, you can read these percentage points from a PPPlot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 13:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205486#M51173</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-04-29T13:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205487#M51174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need the quantiles of the fitted data...so first i have to fit the data to the distribution i am interested in and then extract the quantiles at a sas data. With the code that you can see above i can do all of this except the part of extraction to a sas data. Is there a another way to fit some data to a distribution? I only know this method with the histogram inside a proc univariate..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 13:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205487#M51174</guid>
      <dc:creator>Vasilis</dc:creator>
      <dc:date>2015-04-29T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205488#M51175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In both cases i have to read something first in order to move on. That is not something i want! (I can already read it from the histogram) I want to use the percentile as an input so i need it in sas data form! Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 14:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205488#M51175</guid>
      <dc:creator>Vasilis</dc:creator>
      <dc:date>2015-04-29T14:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205489#M51176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I'm not really grasping the problem here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run PROC UNIVARIATE, you can obtain the estimates of the lognormal coefficients. Use ODS OUTPUT PARAMETERESTIMATES=PARAMS; This will give you a SAS data set with the estimates of the Lognormal distribution. From there, you program the distribution using the Lognormal formula, in a SAS data step to determine the 99%-ile point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As stated in the SAS documentation (click to enlarge so it is readable):&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="10200" alt="SAS Help and Documentation_2015-04-29_10-52-52.gif" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/10200_SAS Help and Documentation_2015-04-29_10-52-52.gif" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 14:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205489#M51176</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-04-29T14:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate - Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205490#M51177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to the forums &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get a table in the results window that you want as a SAS data set you need to find the name using ODS TRACE. &lt;/P&gt;&lt;P&gt;The table name for the quantiles if FITQUANTILES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the SASHELP.CARS dataset I think this is what you want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods table fitquantiles=mpg_city_quantiles;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PROC UNIVARIATE DATA = sashelp.cars NOPRINT ;&lt;/P&gt;&lt;P&gt;VAR mpg_city;&lt;/P&gt;&lt;P&gt;HISTOGRAM&amp;nbsp;&amp;nbsp; mpg_city /&amp;nbsp; NOPLOT LOGNORMAL ( W=1&amp;nbsp; L=1&amp;nbsp; COLOR=YELLOW&amp;nbsp; ZETA=EST THETA=0 SIGMA=EST);&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=mpg_city_quantiles;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A blog post on the topic:&lt;/P&gt;&lt;P&gt;&lt;A href="https://statgeeks.wordpress.com/2013/08/11/how-do-i-get-my-sas-results-into-a-data-set/" title="https://statgeeks.wordpress.com/2013/08/11/how-do-i-get-my-sas-results-into-a-data-set/"&gt;How do I get my SAS results into a data set? | Statistics and other stuff from a geek&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 20:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Univariate-Percentiles/m-p/205490#M51177</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-29T20:20:13Z</dc:date>
    </item>
  </channel>
</rss>

