<?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 Sampling from estimated kernel density in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/615705#M3695</link>
    <description>&lt;P&gt;Dear SAS-community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to sample from an estimated kernel density. So essentially&amp;nbsp;I have observations on some key variables, for which i generate estimated kernel densities. This has succeeded so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next step is to redraw new samples from the estimated kernel densities. Does anyone have a good idea on how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This following example from stack exchange shows how to do it in R (see "best answer"):&lt;/P&gt;&lt;P&gt;&lt;A href="https://stats.stackexchange.com/questions/321542/how-can-i-draw-a-value-randomly-from-a-kernel-density-estimate" target="_blank" rel="noopener"&gt;https://stats.stackexchange.com/questions/321542/how-can-i-draw-a-value-randomly-from-a-kernel-density-estimate&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the code i generate KDE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc KDE data=dat;
	univar variableA / out=EstimatedKD;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;i obtain the relevant levels using "out".&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2020 16:01:00 GMT</pubDate>
    <dc:creator>bjarkeahm</dc:creator>
    <dc:date>2020-01-07T16:01:00Z</dc:date>
    <item>
      <title>Sampling from estimated kernel density</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/615705#M3695</link>
      <description>&lt;P&gt;Dear SAS-community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to sample from an estimated kernel density. So essentially&amp;nbsp;I have observations on some key variables, for which i generate estimated kernel densities. This has succeeded so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next step is to redraw new samples from the estimated kernel densities. Does anyone have a good idea on how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This following example from stack exchange shows how to do it in R (see "best answer"):&lt;/P&gt;&lt;P&gt;&lt;A href="https://stats.stackexchange.com/questions/321542/how-can-i-draw-a-value-randomly-from-a-kernel-density-estimate" target="_blank" rel="noopener"&gt;https://stats.stackexchange.com/questions/321542/how-can-i-draw-a-value-randomly-from-a-kernel-density-estimate&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the code i generate KDE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc KDE data=dat;
	univar variableA / out=EstimatedKD;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;i obtain the relevant levels using "out".&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 16:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/615705#M3695</guid>
      <dc:creator>bjarkeahm</dc:creator>
      <dc:date>2020-01-07T16:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling from estimated kernel density</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/615710#M3696</link>
      <description>&lt;P&gt;Sampling from a kernel densty is equivalent to the "Smooth Bootstrap." Since PROC KDE uses a normal kernel, you would use the kernel bandwidth as the standard deviation of the normal distribution placed around each observation. You randomly select an observation (say, x_i) and then randomly generate a point p_i ~ N(x_i, delta), where delta is the KDE bandwidth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For details and a SAS program, see &lt;A href="https://blogs.sas.com/content/iml/2016/08/17/smooth-bootstrap-sas.html" target="_self"&gt;"The smooth bootstrap method in SAS"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 16:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/615710#M3696</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-01-07T16:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling from estimated kernel density</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/616437#M3706</link>
      <description>&lt;P&gt;Thank you! That seems like the optimal solution.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 12:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Sampling-from-estimated-kernel-density/m-p/616437#M3706</guid>
      <dc:creator>bjarkeahm</dc:creator>
      <dc:date>2020-01-10T12:41:13Z</dc:date>
    </item>
  </channel>
</rss>

