<?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: Density plot of first and last decile of a quantitative variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763181#M30425</link>
    <description>Hi Koen, many thanks. Let me try this code.</description>
    <pubDate>Mon, 23 Aug 2021 03:23:43 GMT</pubDate>
    <dc:creator>mantubiradar19</dc:creator>
    <dc:date>2021-08-23T03:23:43Z</dc:date>
    <item>
      <title>Density plot of first and last decile of a quantitative variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763018#M30418</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know how I can plot the density plot comparing the first and last decile group of a quantitive variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 10:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763018#M30418</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-08-21T10:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Density plot of first and last decile of a quantitative variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763020#M30419</link>
      <description>&lt;P&gt;I don't understand. Compare first decile to last decile based on what criteria of comparison? I would think they are different by definition.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 10:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763020#M30419</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-21T10:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Density plot of first and last decile of a quantitative variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763024#M30421</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start here:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data=sashelp.heart(keep=height) out=work.heart_deciles groups=10;
   VAR height;
   RANKS height_decile;
run;

proc sort data=work.heart_deciles;
  by height_decile;
  where height_decile IN (0,9);
run;

proc sgplot data=work.heart_deciles;
  title "Height Distribution per decile";
  by height_decile;
  histogram height;
  density height;
  density height / type=kernel;
  keylegend / location=inside position=topright;
run;
title;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With PROC SGPANEL, you can have both density plots in one graphical file (one "container").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 10:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763024#M30421</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-08-21T10:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Density plot of first and last decile of a quantitative variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763089#M30422</link>
      <description>&lt;P&gt;Usually, you would compare the distribution of a variable for groups defined by some other variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data=sashelp.heart(keep=weight cholesterol) out=work.heart_deciles groups=10;
   VAR weight;
   RANKS weight_decile;
run;

proc sort data=work.heart_deciles;
  by weight_decile;
run;

proc sgpanel data=work.heart_deciles;
  title "Cholesterol Distribution per Decile";
  where weight_decile in (0,9);
  panelby weight_decile / columns=1;
  histogram Cholesterol;
  density Cholesterol / type=kernel;
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-1629596293620.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62821i69684C1C37EE83EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="PGStats_0-1629596293620.png" alt="PGStats_0-1629596293620.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Aug 2021 01:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763089#M30422</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-08-22T01:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Density plot of first and last decile of a quantitative variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763181#M30425</link>
      <description>Hi Koen, many thanks. Let me try this code.</description>
      <pubDate>Mon, 23 Aug 2021 03:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Density-plot-of-first-and-last-decile-of-a-quantitative-variable/m-p/763181#M30425</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-08-23T03:23:43Z</dc:date>
    </item>
  </channel>
</rss>

