<?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: overlay graph of predicted probabilities from two glimmix models in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476930#M16473</link>
    <description>&lt;P&gt;Because you have additional covariates in the model, your output probably looks all jagged like the second graph in the article &lt;A href="https://blogs.sas.com/content/iml/2017/12/18/visualize-multivariate-regression-models-by-slicing-continuous-variables.html" target="_self"&gt;"Visualize multivariate regression models by slicing continuous variables."&lt;/A&gt;&amp;nbsp;&amp;nbsp;You are trying to&amp;nbsp;plot the predicted values vs count, but each observation also varies in the logps&amp;nbsp; and proceduredate&amp;nbsp;variables, which means that the predicted curve won't vary smoothly with count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution is to select one or more values of the covariates as being fixed. You can then plot&amp;nbsp;the model vs count. The main ideas and several examples are shown in the article &lt;A href="https://blogs.sas.com/content/iml/2017/12/20/create-sliced-fit-plot-sas.html" target="_self"&gt;"How to create a sliced fit plot in SAS."&lt;/A&gt;&amp;nbsp;Personally, I'd try using the EFFECTPLOT SLICEFIT statement in PROC PLM, as shown in the&amp;nbsp;first example of the "How to create a sliced fit plot" article.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read both articles. They are not an easy read, but are informative.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 20:14:12 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-07-10T20:14:12Z</dc:date>
    <item>
      <title>overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476605#M16459</link>
      <description>&lt;P&gt;I am trying to overlay two plots of count vs. predicted probability with confidence intervals from glimmix output.&amp;nbsp;I would like to show the predicted probabilities by group (glimmix was run by group, only two groups). I attempted to do this using proc plm and effectplot, but I don't see a way to overlay plots&amp;nbsp;when there is no interaction term present in the model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 20:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476605#M16459</guid>
      <dc:creator>psh23</dc:creator>
      <dc:date>2018-07-09T20:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476646#M16464</link>
      <description>&lt;P&gt;If it’s not in the plots options you’ll have to capture the data and create your own plot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/116280"&gt;@psh23&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to overlay two plots of count vs. predicted probability with confidence intervals from glimmix output.&amp;nbsp;I would like to show the predicted probabilities by group (glimmix was run by group, only two groups). I attempted to do this using proc plm and effectplot, but I don't see a way to overlay plots&amp;nbsp;when there is no interaction term present in the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 01:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476646#M16464</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-10T01:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476667#M16465</link>
      <description>&lt;P&gt;I can't figure out how to recreate the graph using sgplot - I am looking for something like this (with overlay from regression by groups)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV align="center"&gt;&lt;DIV align="center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21672iB2E8AA82786306A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Jul 2018 05:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476667#M16465</guid>
      <dc:creator>psh23</dc:creator>
      <dc:date>2018-07-10T05:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476757#M16468</link>
      <description>&lt;P&gt;Post the code that you are using to generate the model. Are you using a BY statement to analyze the two groups and an OUTPUT statement to capture the predicted probabilities? If so, the output data set should contain the information you need. You can add the GROUP= option on the SERIES and BAND statements in PROC SGPLOT to overlay the curves.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 12:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476757#M16468</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-07-10T12:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476914#M16471</link>
      <description>&lt;P&gt;proc glimmix data=test;&lt;BR /&gt;class facilityidofindex volume1;&lt;BR /&gt;effect spl=spline(count / naturalcubic knotmethod=equal details);&lt;BR /&gt;model &amp;amp;outcome.(ref='0')= logps proceduredate spl / solution oddsratio dist=binary link=logit;&lt;BR /&gt;random facilityidofindex;&lt;BR /&gt;store logiModel2;&lt;BR /&gt;by volume1;&lt;BR /&gt;output out=out1 pred(ilink)=predicted lcl(ilink)=lower ucl(ilink)=upper;&lt;BR /&gt;id count;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=out1; by count; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=out1;&lt;BR /&gt;band x=count lower=lower upper=upper /group=volume1;&lt;BR /&gt;series x=count y=predicted /group=volume1 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 19:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476914#M16471</guid>
      <dc:creator>psh23</dc:creator>
      <dc:date>2018-07-10T19:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476930#M16473</link>
      <description>&lt;P&gt;Because you have additional covariates in the model, your output probably looks all jagged like the second graph in the article &lt;A href="https://blogs.sas.com/content/iml/2017/12/18/visualize-multivariate-regression-models-by-slicing-continuous-variables.html" target="_self"&gt;"Visualize multivariate regression models by slicing continuous variables."&lt;/A&gt;&amp;nbsp;&amp;nbsp;You are trying to&amp;nbsp;plot the predicted values vs count, but each observation also varies in the logps&amp;nbsp; and proceduredate&amp;nbsp;variables, which means that the predicted curve won't vary smoothly with count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution is to select one or more values of the covariates as being fixed. You can then plot&amp;nbsp;the model vs count. The main ideas and several examples are shown in the article &lt;A href="https://blogs.sas.com/content/iml/2017/12/20/create-sliced-fit-plot-sas.html" target="_self"&gt;"How to create a sliced fit plot in SAS."&lt;/A&gt;&amp;nbsp;Personally, I'd try using the EFFECTPLOT SLICEFIT statement in PROC PLM, as shown in the&amp;nbsp;first example of the "How to create a sliced fit plot" article.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read both articles. They are not an easy read, but are informative.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 20:14:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476930#M16473</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-07-10T20:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476935#M16474</link>
      <description>&lt;P&gt;This is where I originally started&amp;nbsp;- the main problem is that I don't think proc plm / effectplot has the capability to overlay graphs by group?&amp;nbsp;The slicefit option only seems to work if the variable is in the model?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 20:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476935#M16474</guid>
      <dc:creator>psh23</dc:creator>
      <dc:date>2018-07-10T20:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: overlay graph of predicted probabilities from two glimmix models</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476962#M16477</link>
      <description>&lt;P&gt;Ah! Sorry that I misunderstood you. Yes, the EFFECTPLOT statement&amp;nbsp;is for visualizing a single model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/02/14/difference-class-and-by-statements-sas.html" target="_self"&gt;In many cases, putting the BY variable into&amp;nbsp;the CLASS statement produces compatible models &lt;/A&gt;for linear models. If so, you might be able to use the EFFECTPLOT statement anyway: Add volume1 to the model and use SLICEBY=volume1. However, there is definitely a need to check whether the predictive models are the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally, if volume1 is a BY variable, I'd use PROC SGPANEL or ODS LAYOUT GRIDDED to put the plots side-by-side.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 23:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/overlay-graph-of-predicted-probabilities-from-two-glimmix-models/m-p/476962#M16477</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-07-10T23:52:21Z</dc:date>
    </item>
  </channel>
</rss>

