<?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: logistic plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809243#M22790</link>
    <description>&lt;P&gt;The two plots show the same data, except the Y-axis is reversed on the 2nd one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The correct plot is the one from PROC LOGISTIC. I don't think you can get this plot any other way, as other plotting routines will not take into account the logistic function, which is log(p/(1-p)), used in PROC LOGISTIC.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 09:50:26 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-22T09:50:26Z</dc:date>
    <item>
      <title>logistic plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809239#M22789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am plotting Observed probability and Logistic Fit Mean Predicted using PROC TEMPLATE and regressionplot but unable to plot in the correct way using PROC LOGISTIC I am getting results as :&lt;/P&gt;&lt;P&gt;proc logistic data = in_data plots=effect;&lt;BR /&gt;model binary_variable = continuous_variable ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="deep_sas_0-1650616117430.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70729i73D400AFC724E994/image-size/medium?v=v2&amp;amp;px=400" role="button" title="deep_sas_0-1650616117430.png" alt="deep_sas_0-1650616117430.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when using PROC TEMPLATE ; regressionplot the plot seems to look incorrect and also the what is the option to plot probability ?(as below):&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;scatterplot x=continuous_variable y=binary_variable;&lt;/P&gt;&lt;P&gt;regressionplot x=continuous_variable y=binary_variable / name='line'&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="deep_sas_1-1650616220152.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70730iB403FAB810291DB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="deep_sas_1-1650616220152.png" alt="deep_sas_1-1650616220152.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest what is going wrong here and how to plot probability here ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 08:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809239#M22789</guid>
      <dc:creator>deep_sas</dc:creator>
      <dc:date>2022-04-22T08:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: logistic plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809243#M22790</link>
      <description>&lt;P&gt;The two plots show the same data, except the Y-axis is reversed on the 2nd one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The correct plot is the one from PROC LOGISTIC. I don't think you can get this plot any other way, as other plotting routines will not take into account the logistic function, which is log(p/(1-p)), used in PROC LOGISTIC.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 09:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809243#M22790</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-22T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: logistic plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809261#M22791</link>
      <description>&lt;P&gt;You can get the graphs to look more similar by modeling the '1' response instead of the '0' response:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data = in_data plots=effect;
model binary_variable(event='1') = continuous_variable ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the REGRESSIONPLOT statement performs linear least-square regression, not logistic regression. Thus, you will never completely duplicate the plot by using the &lt;STRONG&gt;raw&lt;/STRONG&gt; data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can reproduce the plot by using the predicted values from PROC LOGISTIC. For example, the following example uses the OUTPUT statement to write the predicted values to a SAS data set and then plots the results:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data = in_data plots=effect;
model binary_variable(event='1') = continuous_variable ;
output out=LogiOut Pred=Pred;
run;

proc sort data=LogiOut;
by continuous_variable;
run;

proc sgplot data=LogiOut;
scatter x=continuous_variable y=binary_variable;
series x=continuous_variable y=Pred;
run;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 11:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/logistic-plot/m-p/809261#M22791</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-22T11:02:14Z</dc:date>
    </item>
  </channel>
</rss>

