<?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 estimated percentiles from PROC KDE in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747323#M36364</link>
    <description>Calling &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;</description>
    <pubDate>Fri, 11 Jun 2021 12:46:12 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-06-11T12:46:12Z</dc:date>
    <item>
      <title>How to get estimated percentiles from PROC KDE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747003#M36353</link>
      <description>&lt;P&gt;I would like to estimate the kernel percentiles from PROC KDE with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc kde data=data_ajust;
univar x_0 / percentiles  METHOD=SJPI;
ods output percentiles=P1CDF;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But with this code I get the empirical percentiles and not the kernel percentiles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the following code I can obtain the kernel estimated density, and I can calculate the percentiles with the area under the curve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc kde data=data_ajust;
univar x_0 / percentiles  METHOD=SJPI out=density;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I would like to know if it's possible to get the kernel percentiles directly from the PROC KDE or with another method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 12:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747003#M36353</guid>
      <dc:creator>Mverniquet</dc:creator>
      <dc:date>2021-06-10T12:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get estimated percentiles from PROC KDE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747323#M36364</link>
      <description>Calling &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;</description>
      <pubDate>Fri, 11 Jun 2021 12:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747323#M36364</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-06-11T12:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get estimated percentiles from PROC KDE</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747346#M36365</link>
      <description>&lt;P&gt;Sure, use the CDF option to get the cumulative density estimate. The 100*p_th percentile is the smallest value such that the CDF is greater than or equal to p.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are various ways to get a list of percentiles from the CDF. Here is one way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* sample data */
data heart;
set sashelp.heart; where sex="Female";
run;
/* use the CDF option, which creates the 'Distribution' variable */
proc kde data=heart;
univar cholesterol / CDF  METHOD=SJPI out=density;
run;

/* The 100*p_th percentile is the smallest data value for which the CDF exceeds p */
data Pctls;
array MyPctls[8] _temporary_ (0.05 0.1 0.25 0.5 0.75 0.9 0.95 1.0);  /* end array with 1.0 */
retain k 1;
set density;
Pctl = MyPctls[k];
if distribution &amp;gt;= Pctl then do;
   output;
   k + 1;
end;
drop k;
run;

proc print data=Pctls;
var PCtl Var Value Distribution;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jun 2021 14:06:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-estimated-percentiles-from-PROC-KDE/m-p/747346#M36365</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-06-11T14:06:03Z</dc:date>
    </item>
  </channel>
</rss>

