<?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 How to create multiple kernel distributions in one graph in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24578#M863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome! Thanks for a great question!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like you have variables such as Y2000-Y2011 which represent different yearly measurements of some quantity. You can use the PLOTS=densityoverlay option to overlay the densities of all of these onto a single plot. Here is an example of overlaying two densities in a SASHELP data set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* use KDE to overlay estimates of different variables */&lt;/P&gt;&lt;P&gt;proc kde data=sashelp.cars;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; univar mpg_city mpg_highway / plots=densityoverlay;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jan 2012 20:02:25 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2012-01-06T20:02:25Z</dc:date>
    <item>
      <title>How to create multiple kernel distributions in one graph</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24577#M862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first post so I appologize if I make some rookie mistakes like placing the question in a wrong place or something like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a hopefully simple request, i have made a kernel distribution for a number of years by using proc kde and i wanna have them all in the same graph.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know a option which can be used? I've looked through the documenation for proc kde, but for me it doesn't seem like the options is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;zuki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 15:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24577#M862</guid>
      <dc:creator>zuki</dc:creator>
      <dc:date>2012-01-05T15:17:15Z</dc:date>
    </item>
    <item>
      <title>How to create multiple kernel distributions in one graph</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24578#M863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome! Thanks for a great question!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like you have variables such as Y2000-Y2011 which represent different yearly measurements of some quantity. You can use the PLOTS=densityoverlay option to overlay the densities of all of these onto a single plot. Here is an example of overlaying two densities in a SASHELP data set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* use KDE to overlay estimates of different variables */&lt;/P&gt;&lt;P&gt;proc kde data=sashelp.cars;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; univar mpg_city mpg_highway / plots=densityoverlay;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 20:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24578#M863</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-01-06T20:02:25Z</dc:date>
    </item>
    <item>
      <title>How to create multiple kernel distributions in one graph</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24579#M864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your reply. I think we are almost there but that I was a bit unclear with my formulation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ehm so to elaborate: I have a dataset with one observation per firm (variable: lbnr) per year (variable: year) with a variable for how much they grow in percent (emp_growth) and a variable for how many employees they have in average (emp_avg), so I wanna do the kernel distribution for emp_growth for each value of year in 2007-2009 with emp_avg as weight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am no expert in proc kde, but for me to see you code doesn't know the role of the year variable, but i definetely could be just misunderstanding you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 22:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24579#M864</guid>
      <dc:creator>zuki</dc:creator>
      <dc:date>2012-01-06T22:30:00Z</dc:date>
    </item>
    <item>
      <title>How to create multiple kernel distributions in one graph</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24580#M865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort by year.Then use YEAR as a BY variable and use the OUT= option to save the kernel densities to an output data set. You can use the SERIES statement in PROC SGPLOT to overlay the curves. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't want them overlaid, but are content with a panel, you can use PROC UNIVARIATE.&amp;nbsp; In this case, use YEAR as a CLASS statement. See this example: &lt;A href="http://support.sas.com/documentation/cdl/en/procstat/63963/HTML/default/viewer.htm#procstat_univariate_sect070.htm"&gt;http://support.sas.com/documentation/cdl/en/procstat/63963/HTML/default/viewer.htm#procstat_univariate_sect070.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 23:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-create-multiple-kernel-distributions-in-one-graph/m-p/24580#M865</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-01-06T23:22:16Z</dc:date>
    </item>
  </channel>
</rss>

