<?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 PROC GENMOD BAYES - getting kernel values and densities in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422754#M68053</link>
    <description>&lt;P&gt;Yesterday I was attempting to score my source dataset in a PROC GENMOD, DIST = NORMAL model that also used the BAYES statement, see this thread:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Scoriing-PROC-GENMOD-Dataset-by-hand/m-p/422475#M22248" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/Scoriing-PROC-GENMOD-Dataset-by-hand/m-p/422475#M22248&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With help I figured out how to do it a couple of different ways. Though along the way, at some point, I ran the code and it generated some datasets for all model parameters and those files included the parameter estimate's Kernel values and Densities. I have no idea how I created these datasets (one for every model parameter), since I was trying out a bunch of different code options when trying to address my "scoring" question.&amp;nbsp; I also don't have the outputted files any more, but they were in my SAS 'work.' folder and had the following naming strategy and included&amp;nbsp;fields called "lag...", "interation...", etc.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'_doctmp000000000000000000019'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 19 in the file name represented&amp;nbsp;the number of the file, since there were multiple parameters and the&amp;nbsp;file names were interative. I have&amp;nbsp;been trying to&amp;nbsp;retrace my footstep for about an hour to no avail.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In conclusion, how do I output individual files for model parameters when using GENMOD with BAYES, files include kernel and density values for parameter?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 16:07:55 GMT</pubDate>
    <dc:creator>H</dc:creator>
    <dc:date>2017-12-20T16:07:55Z</dc:date>
    <item>
      <title>PROC GENMOD BAYES - getting kernel values and densities</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422754#M68053</link>
      <description>&lt;P&gt;Yesterday I was attempting to score my source dataset in a PROC GENMOD, DIST = NORMAL model that also used the BAYES statement, see this thread:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Scoriing-PROC-GENMOD-Dataset-by-hand/m-p/422475#M22248" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/Scoriing-PROC-GENMOD-Dataset-by-hand/m-p/422475#M22248&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With help I figured out how to do it a couple of different ways. Though along the way, at some point, I ran the code and it generated some datasets for all model parameters and those files included the parameter estimate's Kernel values and Densities. I have no idea how I created these datasets (one for every model parameter), since I was trying out a bunch of different code options when trying to address my "scoring" question.&amp;nbsp; I also don't have the outputted files any more, but they were in my SAS 'work.' folder and had the following naming strategy and included&amp;nbsp;fields called "lag...", "interation...", etc.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'_doctmp000000000000000000019'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 19 in the file name represented&amp;nbsp;the number of the file, since there were multiple parameters and the&amp;nbsp;file names were interative. I have&amp;nbsp;been trying to&amp;nbsp;retrace my footstep for about an hour to no avail.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In conclusion, how do I output individual files for model parameters when using GENMOD with BAYES, files include kernel and density values for parameter?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 16:07:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422754#M68053</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2017-12-20T16:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD BAYES - getting kernel values and densities</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422789#M68055</link>
      <description>&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 17:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422789#M68055</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-20T17:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD BAYES - getting kernel values and densities</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422864#M68063</link>
      <description>&lt;P&gt;Yes, I was able to track it down using the "ODS TRACE ON" line of code, which had to be on the outside of the 'ODS GRAPHICS ON' line.&amp;nbsp; For any one else in the future looking for kernel data, you can get them with the following code, or also using the PROC KDE code&amp;nbsp;presented further below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
ods graphics on;
ods output  TADPanel=output1;
Proc genmod data=my_dataset;
	class X1 X2;
	model Y = X1 X2 / dist=normal;
	bayes seed=12345 outpost=post;
run;
ods graphics off;
ods trace off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second option, to generate values yourself:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc kde data=post;
   ods exclude inputs controls;
   Univar name_of_posterior_variable /out=sample;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 19:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-GENMOD-BAYES-getting-kernel-values-and-densities/m-p/422864#M68063</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2017-12-20T19:57:12Z</dc:date>
    </item>
  </channel>
</rss>

