<?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 - odds ratio for interaction terms in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116851#M6141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: arial, sans-serif; color: #222222;"&gt;I am running a logistic regression and I need odds ratios and confidence limits for interaction terms using proc logistic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;BR /&gt;I am using the contrast statement but don't know if the matrix I have specified is right.&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;For example, I am looking at the following interactions, 1) group*age and 2) group*sex where group, age and sex are categorical variables having values 1 and 0. The formatting of the variables is as follows:&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;BR /&gt;Sex = 1 if Sex='Male' or Sex=0 if Sex='Female'&lt;BR /&gt;Age = 1 if the age of a particular subject is greater than the median age or 0 otherwise.&lt;BR /&gt;group = 1 if treatment = 'A' , group = 0 if treatment='B'&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit;"&gt;Here is the SAS code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* All variables below including scin_30day are categorical variables with values 1 and 0 EXCEPT &lt;/P&gt;&lt;P&gt;for the variable BASE which is continuous*/&lt;/P&gt;&lt;P&gt;/*I need to add interaction terms group*age, group*sex, group*BMIn, group*VIsn to the model and see if they are significant&lt;/P&gt;&lt;P&gt;and at the same time need Odds ratios and CL values in the output dataset*/&lt;/P&gt;&lt;P&gt;/*Do I specify the interactions in the contrast statement, if yes, how do I write the contrast statements for the &lt;/P&gt;&lt;P&gt;interactions above??*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC LOGISTIC DATA = final_dataset descending;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class group agen Male racen DIABn CR2n logn stsn &lt;/P&gt;&lt;P&gt;&amp;nbsp; ECMRGn EFN Frailn scoren MMSEn BMIn VISn;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MODEL scin_30day = group BASE agen Male racen DIABn CR2n logn stsn &lt;/P&gt;&lt;P&gt;&amp;nbsp; ECMRGn EFN Frailn scoren MMSEn BMIn VISn/rsquare lackfit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods output ParameterEstimates=dPara1 OddsRatios=dOdds1;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 17:49:15 GMT</pubDate>
    <dc:creator>ChrisK</dc:creator>
    <dc:date>2013-04-23T17:49:15Z</dc:date>
    <item>
      <title>proc logistic - odds ratio for interaction terms</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116851#M6141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: arial, sans-serif; color: #222222;"&gt;I am running a logistic regression and I need odds ratios and confidence limits for interaction terms using proc logistic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;BR /&gt;I am using the contrast statement but don't know if the matrix I have specified is right.&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;For example, I am looking at the following interactions, 1) group*age and 2) group*sex where group, age and sex are categorical variables having values 1 and 0. The formatting of the variables is as follows:&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;BR /&gt;Sex = 1 if Sex='Male' or Sex=0 if Sex='Female'&lt;BR /&gt;Age = 1 if the age of a particular subject is greater than the median age or 0 otherwise.&lt;BR /&gt;group = 1 if treatment = 'A' , group = 0 if treatment='B'&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit;"&gt;Here is the SAS code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* All variables below including scin_30day are categorical variables with values 1 and 0 EXCEPT &lt;/P&gt;&lt;P&gt;for the variable BASE which is continuous*/&lt;/P&gt;&lt;P&gt;/*I need to add interaction terms group*age, group*sex, group*BMIn, group*VIsn to the model and see if they are significant&lt;/P&gt;&lt;P&gt;and at the same time need Odds ratios and CL values in the output dataset*/&lt;/P&gt;&lt;P&gt;/*Do I specify the interactions in the contrast statement, if yes, how do I write the contrast statements for the &lt;/P&gt;&lt;P&gt;interactions above??*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC LOGISTIC DATA = final_dataset descending;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class group agen Male racen DIABn CR2n logn stsn &lt;/P&gt;&lt;P&gt;&amp;nbsp; ECMRGn EFN Frailn scoren MMSEn BMIn VISn;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MODEL scin_30day = group BASE agen Male racen DIABn CR2n logn stsn &lt;/P&gt;&lt;P&gt;&amp;nbsp; ECMRGn EFN Frailn scoren MMSEn BMIn VISn/rsquare lackfit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods output ParameterEstimates=dPara1 OddsRatios=dOdds1;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 17:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116851#M6141</guid>
      <dc:creator>ChrisK</dc:creator>
      <dc:date>2013-04-23T17:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic - odds ratio for interaction terms</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116852#M6142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;This link is very helpful.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/kb/24/447.html#ex3" style="font-size: 10pt; line-height: 1.5em;" title="http://support.sas.com/kb/24/447.html#ex3"&gt;24447 - Examples of writing CONTRAST and ESTIMATE statements&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you scan through it (go to Example 3) you will see how to set up your code to get the CI and OR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you may search this forum for "interaction term in logistic regression" and find helpful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 02:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116852#M6142</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-04-24T02:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic - odds ratio for interaction terms</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116853#M6143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure you need a contract statement, but what you do need is to add /param=ref to the end of your class statement.&lt;/P&gt;&lt;P&gt;Add your interaction terms to the model statement.&lt;/P&gt;&lt;P&gt;Add the oddsratio statement for the odds ratio you're interested in (assuming at least 9.2+ I think).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have to change your ods table names to get different tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See here for further reference on getting estimates for odds ratios:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/24/455.html" title="http://support.sas.com/kb/24/455.html"&gt;24455 - Estimating an odds ratio for a variable involved in an interaction&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PROC LOGISTIC DATA = final_dataset descending;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; class group agen Male racen DIABn CR2n logn stsn&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ECMRGn EFN Frailn scoren MMSEn BMIn VISn/&lt;SPAN style="font-size: 12pt; color: #ff0000;"&gt;param=ref&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; MODEL scin_30day = group BASE agen Male racen DIABn CR2n logn stsn&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ECMRGn EFN Frailn scoren MMSEn BMIn VISn &lt;SPAN style="font-size: 12pt; color: #ff0000;"&gt;group*age group*sex add other interaction terms here&lt;/SPAN&gt;/rsquare lackfit;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;oddsratio agen;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;oddsratio male;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;oddsratio&amp;nbsp; group/at=(age=0);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ods output ParameterEstimates=dPara1 OddsRatios=dOdds1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 02:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic-odds-ratio-for-interaction-terms/m-p/116853#M6143</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-24T02:38:04Z</dc:date>
    </item>
  </channel>
</rss>

