<?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 get certain quantile when fitting a distribution on a dataset? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756486#M238852</link>
    <description>&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc univariate data=sashelp.heart CIPCTLDF noprint;&lt;BR /&gt;var cholesterol;&lt;BR /&gt;output out=perc n=n median=med  pctlpts=99.22 pctlpre=pChol;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print;run;</description>
    <pubDate>Sun, 25 Jul 2021 11:36:39 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-07-25T11:36:39Z</dc:date>
    <item>
      <title>How to get certain quantile when fitting a distribution on a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756406#M238801</link>
      <description>&lt;P&gt;I am re-posting this question in hope of getting any answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fitting&amp;nbsp;&lt;SPAN&gt;different distributions to a data set. I am using the following code:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc capability data=pdlsf;
 specs usl=usl;
 var result;
 histogram / normal(indices) Lognormal(indices);
  by par1 par2;
 inset mean std cv n ppk="Ppk" normal(ESTPCTGTR) normal(ksdpval)/ cfill=white pos=ne;
run;
quit;&lt;/PRE&gt;&lt;P&gt;When running the code as expected I get a nice quantile table with predefined quantiles like&amp;nbsp;&lt;/P&gt;&lt;P&gt;1%, 5%, 10%,...., 99%.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need is to get some certain quantiles that is not predefined. Let's say for some calculation I need to get 99.22% quantile estimated by lognormal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I get that non-pre-defined quantile with proc capability? if yeas, how? If not, what proc step can do that for me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A desired outcome could be something like the following table which is basically a quantile table generated by proc capability step with only difference that I defined 99.22% to be calculated in this table.&lt;/P&gt;&lt;PRE&gt;                   Quantiles for lognormal Distribution

quantile                  observed                   estimated
1                           12                       11.422
99.22                       21                       19.485&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jul 2021 15:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756406#M238801</guid>
      <dc:creator>Al_senior</dc:creator>
      <dc:date>2021-07-24T15:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get certain quantile when fitting a distribution on a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756422#M238809</link>
      <description>&lt;P&gt;I'm not familiar with Proc Capability, so this may be of no help at all, but here is a paper that discusses the best SAS procedures for generating custom percentiles:&amp;nbsp;&amp;nbsp;&lt;A href="https://www.lexjansen.com/wuss/2014/114_Final_Paper_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/wuss/2014/114_Final_Paper_PDF.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be that you would need to define/determine the distribution using Proc Capability and then the percentiles with another procedure.&amp;nbsp; A bit of a pain to use multiple procedures, I know, but since no one else has responded, I thought I'd at least suggest supplemental procedures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 18:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756422#M238809</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-07-24T18:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get certain quantile when fitting a distribution on a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756429#M238814</link>
      <description>&lt;P&gt;Here is how to get the observed quantile which does not depend on the assumed distribution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc capability data=sashelp.heart;
var cholesterol;
output out=perc n=n median=med geomean=geom pctlpts=99.22 pctlpre=pChol PCTLNDEC=2;
run;

proc print data=perc label noobs; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGStats_0-1627162224383.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61672i97DB63C8A70D8BC3/image-size/large?v=v2&amp;amp;px=999" role="button" title="PGStats_0-1627162224383.png" alt="PGStats_0-1627162224383.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 21:31:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756429#M238814</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-07-24T21:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get certain quantile when fitting a distribution on a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756486#M238852</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc univariate data=sashelp.heart CIPCTLDF noprint;&lt;BR /&gt;var cholesterol;&lt;BR /&gt;output out=perc n=n median=med  pctlpts=99.22 pctlpre=pChol;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print;run;</description>
      <pubDate>Sun, 25 Jul 2021 11:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-certain-quantile-when-fitting-a-distribution-on-a/m-p/756486#M238852</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-07-25T11:36:39Z</dc:date>
    </item>
  </channel>
</rss>

