<?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: Contour Plot of the Log-Likelihood in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/518012#M17517</link>
    <description>&lt;P&gt;Your example is for a two-parameter model, so I assume b0=Intercept and b1=parameter for X.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC PLM can construct a graph of the predicted values, but SAS regression procedures do not construct plots of the log-likelihood functions. However, you can construct them yourself by writing down the log-likelihood function. Here are some examples that illustrate the method. None of them are exactly what you need, but they show the basic idea about how to do it.:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html" target="_self"&gt;The basic idea of optimizing a likelihood function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/07/02/create-a-contour-plot-in-sas.html" target="_self"&gt;How to create a contour plot in GTL&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/06/12/log-likelihood-function-in-sas.html" target="_self"&gt;How to construct a log-likelihood function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/07/05/compute-multivariate-normal-denstity.html" target="_self"&gt;Make a contour plot of a probability density function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Dec 2018 11:31:35 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-12-03T11:31:35Z</dc:date>
    <item>
      <title>Contour Plot of the Log-Likelihood</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/517922#M17513</link>
      <description>&lt;P&gt;Hello everyone, i'm trying to obtain the contour plot of the log-likelihood function of a log-binomial model for some dataset which the log-binomial model fail to obtain the convergence&lt;/P&gt;&lt;P&gt;Here is the code to obtain one of those dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data nonconv;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input Y X;&lt;BR /&gt;datalines;&lt;BR /&gt;0, -1&lt;BR /&gt;0, -1&lt;BR /&gt;0, 0&lt;BR /&gt;0, 0&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;0, 1&lt;BR /&gt;1, -1&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 0&lt;BR /&gt;1, 1&lt;BR /&gt;;&lt;BR /&gt;And this is the code to obtain the parameter of the model&lt;BR /&gt;proc genmod data=nonconv descending;&lt;BR /&gt;model Y=X / dist=bin link=log;&lt;BR /&gt;store logModel;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I can't find how to plot the contour of the log-likelihood, I was trying with the proc plm but i'm not that familiar with this statement.&lt;/P&gt;&lt;P&gt;The plot that i'm trying to obtain is similar to the image below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="countors.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25321i1C93BC0834FA56CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="countors.JPG" alt="countors.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 21:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/517922#M17513</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-12-02T21:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Contour Plot of the Log-Likelihood</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/517935#M17514</link>
      <description>&lt;P&gt;Are you receiving an error message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 23:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/517935#M17514</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-12-02T23:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Contour Plot of the Log-Likelihood</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/517936#M17515</link>
      <description>&lt;P&gt;Actually I didn't really understand how the proc pml work, and I don't know if it could help me or if there is any better statement&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 23:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/517936#M17515</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-12-02T23:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Contour Plot of the Log-Likelihood</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/518012#M17517</link>
      <description>&lt;P&gt;Your example is for a two-parameter model, so I assume b0=Intercept and b1=parameter for X.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC PLM can construct a graph of the predicted values, but SAS regression procedures do not construct plots of the log-likelihood functions. However, you can construct them yourself by writing down the log-likelihood function. Here are some examples that illustrate the method. None of them are exactly what you need, but they show the basic idea about how to do it.:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html" target="_self"&gt;The basic idea of optimizing a likelihood function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/07/02/create-a-contour-plot-in-sas.html" target="_self"&gt;How to create a contour plot in GTL&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/06/12/log-likelihood-function-in-sas.html" target="_self"&gt;How to construct a log-likelihood function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/07/05/compute-multivariate-normal-denstity.html" target="_self"&gt;Make a contour plot of a probability density function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 11:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/518012#M17517</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-12-03T11:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Contour Plot of the Log-Likelihood</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/518679#M17526</link>
      <description>&lt;P&gt;Remember, PROC SGPLOT supports the VBOX Statement, that will do something similar&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 06:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Contour-Plot-of-the-Log-Likelihood/m-p/518679#M17526</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-12-05T06:59:32Z</dc:date>
    </item>
  </channel>
</rss>

