<?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: Estimating odds ratios for interaction terms in Proc Logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/307193#M16261</link>
    <description>&lt;P&gt;What are you expecting as output for that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they were both categorical you could look at it for all levels, but since one is continuous you need to pick one or several values for weight to consider.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2016 17:54:27 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-10-25T17:54:27Z</dc:date>
    <item>
      <title>Estimating O.R.s for interaction terms bt continuous &amp; categorical variables in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306893#M16239</link>
      <description>&lt;P&gt;I am trying to estimate odds ratios for interaction terms in a logistic regression using v9.4. I've found&amp;nbsp;this article,&amp;nbsp;&lt;A href="http://support.sas.com/kb/24/455.html" target="_blank"&gt;http://support.sas.com/kb/24/455.html&lt;/A&gt;, but can't find an explanation for how to determine which numbers to enter into the matrix (the 1s, 0s, -1s in the example) in the estimate statement to pull what I want. I am specifcially having difficulty figuring out how to pull for an interaction between a continuous variable (peervicadd) and a categorical one (percschsafe).&amp;nbsp;For good measure, here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt; &lt;STRONG&gt;logistic&lt;/STRONG&gt; data=secondyp.lgbq;&lt;/P&gt;&lt;P&gt;class race(ref="5" param=ref) sex(ref="1" param=ref) percschsafe(param=ref ref="0");&lt;/P&gt;&lt;P&gt;model SuicideAttemptA(event='1')=peervicadd race age sex grade percschsafe percschsafe*peervicadd/clodds=wald lackfit expb;&lt;/P&gt;&lt;P&gt;estimate "Peer Victimization" peervicadd &lt;STRONG&gt;1&lt;/STRONG&gt;/exp cl;&lt;/P&gt;&lt;P&gt;estimate "Perception of School Safety (No)" percschsafe &lt;STRONG&gt;0&lt;/STRONG&gt; /exp cl;&lt;/P&gt;&lt;P&gt;estimate "Perception of School Safety (Yes)" percschsafe &lt;STRONG&gt;1&lt;/STRONG&gt; /exp cl;&lt;/P&gt;&lt;P&gt;Estimate "Peer Victimization x Perceptions of School Safety (No)" percschsafe*peervicadd &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;1&lt;/STRONG&gt; /exp cl;&lt;/P&gt;&lt;P&gt;Estimate "Peer Victimization x Perceptions of School Safety (Yes)" percschsafe*peervicadd &lt;STRONG&gt;1&lt;/STRONG&gt; &lt;STRONG&gt;1&lt;/STRONG&gt; /exp cl;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding to the mystery, I keep getting this message in the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: More coefficients than levels specified for effect PeerVicAd*PercSchSaf.&amp;nbsp; Some&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coefficients will be ignored.&lt;/P&gt;&lt;P&gt;WARNING: More coefficients than levels specified for effect PeerVicAd*PercSchSaf.&amp;nbsp; Some&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coefficients will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone could point me to a reference to see what #'s line up to the various columns in the Estimate statement, I would be very appreciative.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 23:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306893#M16239</guid>
      <dc:creator>abarnett313</dc:creator>
      <dc:date>2016-10-25T23:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating odds ratios for interaction terms in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306895#M16240</link>
      <description>&lt;P&gt;Use the ODDSRATIO statement instead, a bit easier to navigate in my opinion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're looking for the interaction between a categorical and continuous variable so you may want to specify levels, it chooses the average by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=sashelp.heart;
class sex ;
model status = ageatstart height weight sex weight*sex ;
oddsratio sex;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Oct 2016 17:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306895#M16240</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-24T17:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating odds ratios for interaction terms in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306902#M16242</link>
      <description>Thanks for your reply. I tried to use an oddsratio statement, but I got results that didn't make sense -- the OR's didn't cross 1 even though the interaction term wasn't significant. Is it pulling the interaction term or the predictor variable (sex in your example)?</description>
      <pubDate>Mon, 24 Oct 2016 18:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306902#M16242</guid>
      <dc:creator>abarnett313</dc:creator>
      <dc:date>2016-10-24T18:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating odds ratios for interaction terms in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306928#M16245</link>
      <description>&lt;P&gt;The OR's shouldn't cross 1 if the term is insignificant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you have an interaction term, you can only look at a 'conditional' oddsratio of your variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ie Sex at average weight of 158lbs&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 19:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/306928#M16245</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-24T19:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating odds ratios for interaction terms in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/307172#M16259</link>
      <description>&lt;P&gt;That makes sense; thank you. I'd like to pull an estimate for the interaction term itself (i.e. in your example, sex*weight). Is that possible with the oddsratio statment?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/307172#M16259</guid>
      <dc:creator>abarnett313</dc:creator>
      <dc:date>2016-10-25T15:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating odds ratios for interaction terms in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/307193#M16261</link>
      <description>&lt;P&gt;What are you expecting as output for that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they were both categorical you could look at it for all levels, but since one is continuous you need to pick one or several values for weight to consider.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 17:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimating-O-R-s-for-interaction-terms-bt-continuous-amp/m-p/307193#M16261</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-25T17:54:27Z</dc:date>
    </item>
  </channel>
</rss>

