<?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: Two-dimension PDF made by PROC SGPLOT to estimate the probability mass in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967449#M25551</link>
    <description>&lt;P&gt;Check&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; blogs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/07/21/add-prediction-ellipse.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/07/21/add-prediction-ellipse.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/07/23/prediction-ellipses-from-covariance.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/07/23/prediction-ellipses-from-covariance.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data Have; set sashelp.heart(keep=weight height); run;
   proc kde data=Have ;
     bivar weight height /out=out(rename=(value1=weight value2=height)) bwm=2 ngrid=250  plots=contour;
   run;
   proc sort data=Out;  by density;  run;

   data out2;
    set out have(keep=weight height rename=(weight=weight2 height=height2));
run;


   proc sgplot data=Out2;
      styleattrs wallcolor=white;
      scatter x=weight y=height / colorresponse=density colormodel=ThreeColorRamp
                         markerattrs=(symbol=CircleFilled) transparency=0.5;
	   ellipse x=weight2 y=height2;           /* default is ALPHA=0.05 */

   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1748226346751.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107338iE3775A9BDF94A32F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1748226346751.png" alt="Ksharp_0-1748226346751.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 May 2025 02:25:59 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-05-26T02:25:59Z</dc:date>
    <item>
      <title>Two-dimension PDF made by PROC SGPLOT to estimate the probability mass</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967415#M25550</link>
      <description>&lt;P&gt;Hi, guys&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I expand my research of PDF graph to two variables. Here is my code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have; set Sample2(keep=weight inf_weight); run;
   proc kde data=Have;
     bivar weight inf_weight / bwm=2 ngrid=250 plots=contour;
     score data=Have out=Out(rename=(value1=weight value2=inf_weight));
   run;
   proc sort data=Out;  by density;  run;
   proc sgplot data=Out;
      styleattrs wallcolor=white;
      scatter x=weight y=inf_weight / colorresponse=density colormodel=ThreeColorRamp
                         markerattrs=(symbol=CircleFilled) transparency=0.5;
      xaxis grid values=(30 to 150); 
      yaxis grid values=(500 to 6000);
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will produce a scatter plot and the value of PDFs is represented by the color.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unknown-3.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107327iA887665A7C96E090/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unknown-3.png" alt="Unknown-3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I intend to know the area that corresponds to a probability mass of 95%, how do I get it and mark the area on the graph? I know there is another type of graph called surface plot which uses the volume to represent the probability mass but that's not my consideration. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 08:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967415#M25550</guid>
      <dc:creator>TomHsiung</dc:creator>
      <dc:date>2025-05-25T08:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Two-dimension PDF made by PROC SGPLOT to estimate the probability mass</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967449#M25551</link>
      <description>&lt;P&gt;Check&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; blogs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/07/21/add-prediction-ellipse.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/07/21/add-prediction-ellipse.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/07/23/prediction-ellipses-from-covariance.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/07/23/prediction-ellipses-from-covariance.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data Have; set sashelp.heart(keep=weight height); run;
   proc kde data=Have ;
     bivar weight height /out=out(rename=(value1=weight value2=height)) bwm=2 ngrid=250  plots=contour;
   run;
   proc sort data=Out;  by density;  run;

   data out2;
    set out have(keep=weight height rename=(weight=weight2 height=height2));
run;


   proc sgplot data=Out2;
      styleattrs wallcolor=white;
      scatter x=weight y=height / colorresponse=density colormodel=ThreeColorRamp
                         markerattrs=(symbol=CircleFilled) transparency=0.5;
	   ellipse x=weight2 y=height2;           /* default is ALPHA=0.05 */

   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1748226346751.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107338iE3775A9BDF94A32F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1748226346751.png" alt="Ksharp_0-1748226346751.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 02:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967449#M25551</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-26T02:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Two-dimension PDF made by PROC SGPLOT to estimate the probability mass</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967473#M25557</link>
      <description>Thanks, dear buddy &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;</description>
      <pubDate>Mon, 26 May 2025 06:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Two-dimension-PDF-made-by-PROC-SGPLOT-to-estimate-the/m-p/967473#M25557</guid>
      <dc:creator>TomHsiung</dc:creator>
      <dc:date>2025-05-26T06:11:44Z</dc:date>
    </item>
  </channel>
</rss>

