<?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 Logistic Regression using informative priors - PROC GENMOD in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481526#M25038</link>
    <description>&lt;P&gt;I am trying to run logistic regression using informative prior assumptions with PROC GENMOD.&amp;nbsp; I found an example of how to assign prior distributions explicitly for dichotomous variables.&amp;nbsp; However, the variable I want to use has 4 levels(called VAR below).&amp;nbsp; I just want my priors to reflect the VAR distributions.&amp;nbsp; Could someone please help me with naming the variables in the prior dataset?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Snapshot of data -&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARBIG&amp;nbsp; &amp;nbsp; &amp;nbsp;EVENT&lt;/P&gt;&lt;P&gt;1 to 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 to 999&amp;nbsp; &amp;nbsp; &amp;nbsp; 0/1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Input prior distributions;&lt;/P&gt;&lt;P&gt;data Prior;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;input _type_ $ Intercept &lt;U&gt;&lt;STRONG&gt;???????&lt;/STRONG&gt;&lt;/U&gt;; *What do I call them to indicate VAR=1, VAR=2...?;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;datalines;&lt;/P&gt;&lt;P&gt;Var&amp;nbsp;1 1 1 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mean&amp;nbsp;0 .2 .3 .5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=model_out;&lt;BR /&gt;class VAR&amp;nbsp;(ref='1') VARBIG / param=ref;&lt;BR /&gt;model&amp;nbsp;EVENT(event='1') = &lt;SPAN&gt;VAR&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;VARBIG&lt;/SPAN&gt; &lt;SPAN&gt;VAR&lt;/SPAN&gt;*&lt;SPAN&gt;VARBIG&lt;/SPAN&gt; / DIST=bin LINK=logit;&lt;BR /&gt;bayes seed=1 coeffprior=normal(input=Prior);&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 14:29:30 GMT</pubDate>
    <dc:creator>bathbrew</dc:creator>
    <dc:date>2018-07-26T14:29:30Z</dc:date>
    <item>
      <title>Logistic Regression using informative priors - PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481526#M25038</link>
      <description>&lt;P&gt;I am trying to run logistic regression using informative prior assumptions with PROC GENMOD.&amp;nbsp; I found an example of how to assign prior distributions explicitly for dichotomous variables.&amp;nbsp; However, the variable I want to use has 4 levels(called VAR below).&amp;nbsp; I just want my priors to reflect the VAR distributions.&amp;nbsp; Could someone please help me with naming the variables in the prior dataset?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Snapshot of data -&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARBIG&amp;nbsp; &amp;nbsp; &amp;nbsp;EVENT&lt;/P&gt;&lt;P&gt;1 to 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 to 999&amp;nbsp; &amp;nbsp; &amp;nbsp; 0/1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Input prior distributions;&lt;/P&gt;&lt;P&gt;data Prior;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;input _type_ $ Intercept &lt;U&gt;&lt;STRONG&gt;???????&lt;/STRONG&gt;&lt;/U&gt;; *What do I call them to indicate VAR=1, VAR=2...?;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;datalines;&lt;/P&gt;&lt;P&gt;Var&amp;nbsp;1 1 1 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mean&amp;nbsp;0 .2 .3 .5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=model_out;&lt;BR /&gt;class VAR&amp;nbsp;(ref='1') VARBIG / param=ref;&lt;BR /&gt;model&amp;nbsp;EVENT(event='1') = &lt;SPAN&gt;VAR&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;VARBIG&lt;/SPAN&gt; &lt;SPAN&gt;VAR&lt;/SPAN&gt;*&lt;SPAN&gt;VARBIG&lt;/SPAN&gt; / DIST=bin LINK=logit;&lt;BR /&gt;bayes seed=1 coeffprior=normal(input=Prior);&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481526#M25038</guid>
      <dc:creator>bathbrew</dc:creator>
      <dc:date>2018-07-26T14:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using informative priors - PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481527#M25039</link>
      <description />
      <pubDate>Thu, 26 Jul 2018 14:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481527#M25039</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-26T14:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using informative priors - PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481531#M25040</link>
      <description>&lt;P&gt;Thank you for the quick response.&amp;nbsp; Does that imply that it just fills in for the first levels and I don't actually need to name the variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't used the Bayes statement before so I appreciate your patience!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481531#M25040</guid>
      <dc:creator>bathbrew</dc:creator>
      <dc:date>2018-07-26T14:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using informative priors - PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481618#M25051</link>
      <description>&lt;P&gt;As noted in the documentation of the CPRIOR= option, "Parameter names can be found in any of the tables (such as the "Initial Values of the Chain" table) in the Bayesian Analysis section of the results."&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 17:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481618#M25051</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-07-26T17:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using informative priors - PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481666#M25054</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; Could you please give me an example?&amp;nbsp; I am new to using the Bayes statement in GENMOD and cannot find an example online where the priors are for a categorical variable with more than 2 levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 19:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/481666#M25054</guid>
      <dc:creator>bathbrew</dc:creator>
      <dc:date>2018-07-26T19:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression using informative priors - PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/574231#M28234</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219149"&gt;@bathbrew&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see your post was from a year ago and I don't have a direction solution for you.&amp;nbsp;- but though this may help the greater community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would try if the naming convention was confusing, would be to run the model with the default flat priors and see how they are getting applied in the output. Then&amp;nbsp;output the posteriors from the model, and see how it is auto-naming the terms in the model in the generated file. I remember being confused when&amp;nbsp;I was just using a binary covariate.&amp;nbsp;Once you have these generated names you may be able to then try to use them when defining your&amp;nbsp;informative priors. While doing this,&amp;nbsp;look at the model output and see that they are getting applied appropriately. Another initially confusing attribute is that precision = 1 /&amp;nbsp;supplied variance value. So you&amp;nbsp;define a certain prior for variance then the output actually displays&amp;nbsp;its inverse as precision. &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 15:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-using-informative-priors-PROC-GENMOD/m-p/574231#M28234</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2019-07-17T15:40:19Z</dc:date>
    </item>
  </channel>
</rss>

