<?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 Logistic: EffectPlot in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403480#M21040</link>
    <description>&lt;P class="p1"&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;I would like to create a plot with the probability of being treated on the y-axis and the contract-type (continuous variable between 0-1) on the x-axis. I would like to compare the effect of an increasing contract-type between the years, so I&amp;nbsp;want to see this line graph per year and stacked in the same graph.&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;This is what I have, but I am not sure how to show this with a different graph per year.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;logistic&lt;/STRONG&gt;&lt;/SPAN&gt; data&lt;SPAN class="s2"&gt;=data &lt;/SPAN&gt;descending&lt;SPAN class="s2"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;model&lt;/SPAN&gt; treated = contract y2011 y2012 y2013 y2011*contract y2012*contract y2013*contract;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;store&lt;/SPAN&gt; logit;&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s3"&gt;title&lt;/SPAN&gt; "Change in the probability of being treated by year and contract-type"&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p2"&gt;ODS GRAPHICS ON&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;plm&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;source&lt;/SPAN&gt;=logit;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;effectplot&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;slicefit&lt;/SPAN&gt;(&lt;SPAN class="s3"&gt;x&lt;/SPAN&gt;=contract &lt;SPAN class="s3"&gt;plotby&lt;/SPAN&gt;=...);&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;ODS GRAPHICS Off&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 09:37:33 GMT</pubDate>
    <dc:creator>GKati</dc:creator>
    <dc:date>2017-10-12T09:37:33Z</dc:date>
    <item>
      <title>Proc Logistic: EffectPlot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403480#M21040</link>
      <description>&lt;P class="p1"&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;I would like to create a plot with the probability of being treated on the y-axis and the contract-type (continuous variable between 0-1) on the x-axis. I would like to compare the effect of an increasing contract-type between the years, so I&amp;nbsp;want to see this line graph per year and stacked in the same graph.&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;This is what I have, but I am not sure how to show this with a different graph per year.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;logistic&lt;/STRONG&gt;&lt;/SPAN&gt; data&lt;SPAN class="s2"&gt;=data &lt;/SPAN&gt;descending&lt;SPAN class="s2"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;model&lt;/SPAN&gt; treated = contract y2011 y2012 y2013 y2011*contract y2012*contract y2013*contract;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;store&lt;/SPAN&gt; logit;&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s3"&gt;title&lt;/SPAN&gt; "Change in the probability of being treated by year and contract-type"&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p2"&gt;ODS GRAPHICS ON&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;plm&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;source&lt;/SPAN&gt;=logit;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;effectplot&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;slicefit&lt;/SPAN&gt;(&lt;SPAN class="s3"&gt;x&lt;/SPAN&gt;=contract &lt;SPAN class="s3"&gt;plotby&lt;/SPAN&gt;=...);&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;ODS GRAPHICS Off&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 09:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403480#M21040</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2017-10-12T09:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic: EffectPlot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403527#M21041</link>
      <description>&lt;P&gt;It's not clear how your data are structured. Are&amp;nbsp;y2011-y2013 dummy variables or something else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I think the correct way to structure the data for this analysis is to have the data in the "long form". You should create&amp;nbsp;the variable YEAR with the values 2011, 2012, and 2013.&lt;/P&gt;
&lt;P&gt;For ideas about how to convert from wide to long data, see &lt;A href="https://blogs.sas.com/content/iml/2011/01/31/reshaping-data-from-wide-to-long-format.html" target="_self"&gt;"Reshaping data from wide to long."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can&amp;nbsp;model the data by using syntax such as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLASS YEAR;&lt;/P&gt;
&lt;P&gt;MODEL treated = contract | year;&lt;/P&gt;
&lt;P&gt;and you can use PLOTBY=YEAR in the effect plot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For examples of using the EFFECTPLOT statement, see &lt;A href="https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html" target="_self"&gt;"Use the EFFECTPLOT statement to visualize regression models in SAS."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 12:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403527#M21041</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-10-12T12:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic: EffectPlot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403599#M21045</link>
      <description>&lt;P&gt;Instead of using several dummy variables in your model, use a single Year variable that has levels 2011, 2012, and 2013 (which you probably already have in your data). Then this will do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic;
class year;
model cb1=contract|year;
effectplot slicefit(x=contract sliceby=year)/noobs;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Oct 2017 15:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403599#M21045</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-10-12T15:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic: EffectPlot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403816#M21057</link>
      <description>Thanks Stat_Dave! The issue with that is by doing that I’m forcing the annual change to be constant and I’m actually more interested in seeing the trend between years.&lt;BR /&gt;&lt;BR /&gt;K.&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Oct 2017 07:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403816#M21057</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2017-10-13T07:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic: EffectPlot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403923#M21059</link>
      <description>&lt;P&gt;The code I showed fits a model equivalent to your original code. Mine just uses the CLASS statement to construct the dummy variables for Year internally rather than explicitly as in yours. Both treat Year as categorical which allows for any pattern of change in the response over time. And, because the interaction is in the model, they both allow the relationship between the response probability and Contract to change from year to year.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 13:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-EffectPlot/m-p/403923#M21059</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-10-13T13:40:51Z</dc:date>
    </item>
  </channel>
</rss>

