<?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 Effectplot question in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Effectplot-question/m-p/674756#M32452</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested in plotting the predicted probabilities from an interaction I've created using proc genmod. I would like to have the x-axis be a categorical variable by year, so the probabilities are displayed as strait lines between years. I set year as a categorical variable in my model with 2011 (earliest year) as the reference. However, when I create the effect plot, the years are displaying out of order. Does anyone know if there is an easy way to set the ordering/levels of the categorical variable on the x-axis. For reference, example code is below. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&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="s2"&gt;source&lt;/SPAN&gt;=genmod;&lt;/P&gt;&lt;P class="p2"&gt;effectplot interaction&lt;SPAN class="s3"&gt; (&lt;/SPAN&gt;x&lt;SPAN class="s3"&gt;=year &lt;/SPAN&gt;sliceby&lt;SPAN class="s3"&gt;=group )&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2020 15:30:37 GMT</pubDate>
    <dc:creator>jgreenberg321</dc:creator>
    <dc:date>2020-08-05T15:30:37Z</dc:date>
    <item>
      <title>Effectplot question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Effectplot-question/m-p/674756#M32452</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested in plotting the predicted probabilities from an interaction I've created using proc genmod. I would like to have the x-axis be a categorical variable by year, so the probabilities are displayed as strait lines between years. I set year as a categorical variable in my model with 2011 (earliest year) as the reference. However, when I create the effect plot, the years are displaying out of order. Does anyone know if there is an easy way to set the ordering/levels of the categorical variable on the x-axis. For reference, example code is below. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&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="s2"&gt;source&lt;/SPAN&gt;=genmod;&lt;/P&gt;&lt;P class="p2"&gt;effectplot interaction&lt;SPAN class="s3"&gt; (&lt;/SPAN&gt;x&lt;SPAN class="s3"&gt;=year &lt;/SPAN&gt;sliceby&lt;SPAN class="s3"&gt;=group )&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Effectplot-question/m-p/674756#M32452</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-08-05T15:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Effectplot question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Effectplot-question/m-p/676977#M32454</link>
      <description>&lt;P&gt;Try explicitly setting the order for the YEAR variable in your CLASS statement so that its levels are ordered by its internal levels. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod;
class group year(order=internal);
model y=group year;
effectplot interaction(x=year sliceby=group);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 15 Aug 2020 15:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Effectplot-question/m-p/676977#M32454</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-08-15T15:08:59Z</dc:date>
    </item>
  </channel>
</rss>

