<?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: How to output oddsratio and parameterestimates from interaction terms in proc logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611091#M29578</link>
    <description>&lt;P&gt;Dear Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just found out that the statement&amp;nbsp;ods output OddsRatiosWald=outputdata provides me with oddsratios from the oddsratio statement. The final model should look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;proc logistic data=_mi_fcs_komplet ;&lt;BR /&gt;by _Imputation_; *100 imputations;&lt;BR /&gt;class Efficacy (ref='No') age (ref="&amp;gt;=40") sex (ref="2 Female") ;&lt;BR /&gt;model Efficacy = age|Att24_pa sex diseaseDurationYrs baselineedss ;&lt;BR /&gt;oddsratio att24_pa ;&amp;nbsp;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=lgsparms ODDSRATIOS=lgsodds;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;ODS OUTPUT OddsRatiosWald=orw;*These are the odds ratios from the oddsratio statement;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;Another solution could be to use dummyvariables for the interaction terms. That work just as well!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;Tine&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 18:15:55 GMT</pubDate>
    <dc:creator>TineKopp</dc:creator>
    <dc:date>2019-12-11T18:15:55Z</dc:date>
    <item>
      <title>How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/610424#M29549</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have imputed missing values in my dataset by proc mi and wants to provide odds ratios and parameterestimates in seperate datasets on the interaction between a categorical (age, two levels) and continuous (Att24_pa: number of relapses per year) variable. However, when I run proc logistic with an ODDSRATIO statement followed by ods out, I only get datasets with&amp;nbsp;odds ratios and parameterestimates on the variables not included in the interactionterm (here: sex, diseaseDurationYrs and baselineedss). "_mi_fcs_komplet" is the dataset with imputed missing values. So, when I run this model, I get one odds ratio from each level in the age category for the increment in the continuous&amp;nbsp;Att24_pa variable. And I need to output these two estimates with confidence intervals so I can combine them using proc mianalyze, followed by log-transforming, combining again and, finally, back-transformation. Also, I'm not sure whether the proc mianayze statement is correct for interaction terms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I have used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=_mi_fcs_komplet ;&lt;BR /&gt;by _Imputation_; *100 imputations;&lt;BR /&gt;class Efficacy (ref='No') age (ref="&amp;gt;=40") sex (ref="2 Female") ;&lt;BR /&gt;model Efficacy = age|Att24_pa sex diseaseDurationYrs baselineedss ;&lt;BR /&gt;oddsratio att24_pa ; *This is the information I need to be outputted;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=lgsparms ODDSRATIOS=lgsodds;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Combining the 100 imputations */&lt;BR /&gt;proc mianalyze parms(classvar=CLASSVAL )=lgsparms;&lt;BR /&gt;class age sex;&lt;BR /&gt;modeleffects age|Att24_pa sex diseaseDurationYrs baselineedss;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=mian_ /*lgsparms*/;&lt;BR /&gt;run;&lt;BR /&gt;*** Log-transform odds ratio estimates and obtain standard error from confidence intervals ***;&lt;BR /&gt;*Får dog kun alderseffekten ud her;&lt;BR /&gt;DATA lgsodds_t; SET lgsodds(WHERE=(INDEX(EFFECT,"att24_pa")));&lt;BR /&gt;log_or_lr_value=LOG(ODDSRATIOEST);&lt;BR /&gt;log_or_lr_se=(LOG(UPPERCL)-LOG(LOWERCL))/(2*1.96);&lt;BR /&gt;RUN;&lt;BR /&gt;*** Combine transformed estimates;&lt;BR /&gt;PROC MIANALYZE DATA=lgsodds_t;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=mian_lgsodds_t;&lt;BR /&gt;MODELEFFECTS log_or_lr_value;&lt;BR /&gt;STDERR log_or_lr_se;&lt;BR /&gt;RUN;&lt;BR /&gt;*** Back-transform combined values;&lt;BR /&gt;DATA mian_lgsodds_bt; SET mian_lgsodds_t;&lt;BR /&gt;Estimate_back = EXP(ESTIMATE); *Pooled odds ratio;&lt;BR /&gt;LCL_back=Estimate_back*EXP(-1.96*STDERR); *Pooled lower limit;&lt;BR /&gt;UCL_back=Estimate_back*EXP(+1.96*STDERR); *Pooled upper limit;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Tine&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 09:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/610424#M29549</guid>
      <dc:creator>TineKopp</dc:creator>
      <dc:date>2019-12-09T09:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/610521#M29553</link>
      <description>&lt;P&gt;Here's some instructions and explanations on how to capture output that is shown. &lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods-output-statement/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods-output-statement/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188254"&gt;@TineKopp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have imputed missing values in my dataset by proc mi and wants to provide odds ratios and parameterestimates in seperate datasets on the interaction between a categorical (age, two levels) and continuous (Att24_pa: number of relapses per year) variable. However, when I run proc logistic with an ODDSRATIO statement followed by ods out, I only get datasets with&amp;nbsp;odds ratios and parameterestimates on the variables not included in the interactionterm (here: sex, diseaseDurationYrs and baselineedss). "_mi_fcs_komplet" is the dataset with imputed missing values. So, when I run this model, I get one odds ratio from each level in the age category for the increment in the continuous&amp;nbsp;Att24_pa variable. And I need to output these two estimates with confidence intervals so I can combine them using proc mianalyze, followed by log-transforming, combining again and, finally, back-transformation. Also, I'm not sure whether the proc mianayze statement is correct for interaction terms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the code I have used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc logistic data=_mi_fcs_komplet ;&lt;BR /&gt;by _Imputation_; *100 imputations;&lt;BR /&gt;class Efficacy (ref='No') age (ref="&amp;gt;=40") sex (ref="2 Female") ;&lt;BR /&gt;model Efficacy = age|Att24_pa sex diseaseDurationYrs baselineedss ;&lt;BR /&gt;oddsratio att24_pa ; *This is the information I need to be outputted;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=lgsparms ODDSRATIOS=lgsodds;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Combining the 100 imputations */&lt;BR /&gt;proc mianalyze parms(classvar=CLASSVAL )=lgsparms;&lt;BR /&gt;class age sex;&lt;BR /&gt;modeleffects age|Att24_pa sex diseaseDurationYrs baselineedss;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=mian_ /*lgsparms*/;&lt;BR /&gt;run;&lt;BR /&gt;*** Log-transform odds ratio estimates and obtain standard error from confidence intervals ***;&lt;BR /&gt;*Får dog kun alderseffekten ud her;&lt;BR /&gt;DATA lgsodds_t; SET lgsodds(WHERE=(INDEX(EFFECT,"att24_pa")));&lt;BR /&gt;log_or_lr_value=LOG(ODDSRATIOEST);&lt;BR /&gt;log_or_lr_se=(LOG(UPPERCL)-LOG(LOWERCL))/(2*1.96);&lt;BR /&gt;RUN;&lt;BR /&gt;*** Combine transformed estimates;&lt;BR /&gt;PROC MIANALYZE DATA=lgsodds_t;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=mian_lgsodds_t;&lt;BR /&gt;MODELEFFECTS log_or_lr_value;&lt;BR /&gt;STDERR log_or_lr_se;&lt;BR /&gt;RUN;&lt;BR /&gt;*** Back-transform combined values;&lt;BR /&gt;DATA mian_lgsodds_bt; SET mian_lgsodds_t;&lt;BR /&gt;Estimate_back = EXP(ESTIMATE); *Pooled odds ratio;&lt;BR /&gt;LCL_back=Estimate_back*EXP(-1.96*STDERR); *Pooled lower limit;&lt;BR /&gt;UCL_back=Estimate_back*EXP(+1.96*STDERR); *Pooled upper limit;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many Thanks,&lt;/P&gt;
&lt;P&gt;Tine&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 17:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/610521#M29553</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-09T17:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/610919#M29571</link>
      <description>&lt;P&gt;Dear Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the link. However, I have already used the ods output statement so the question is what I should call the&amp;nbsp;output object name in order to output odds ratios from the oddsratio statement. I have managed to output the interaction term, but I still need the odds ratios produced by my statement "&lt;SPAN&gt;oddsratio att24_pa" which is the odds ratio of Att24_pa at age=&amp;lt;40 and&amp;nbsp;Att24_pa at age=&amp;gt;=40.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tine&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 08:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/610919#M29571</guid>
      <dc:creator>TineKopp</dc:creator>
      <dc:date>2019-12-11T08:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611091#M29578</link>
      <description>&lt;P&gt;Dear Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just found out that the statement&amp;nbsp;ods output OddsRatiosWald=outputdata provides me with oddsratios from the oddsratio statement. The final model should look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;proc logistic data=_mi_fcs_komplet ;&lt;BR /&gt;by _Imputation_; *100 imputations;&lt;BR /&gt;class Efficacy (ref='No') age (ref="&amp;gt;=40") sex (ref="2 Female") ;&lt;BR /&gt;model Efficacy = age|Att24_pa sex diseaseDurationYrs baselineedss ;&lt;BR /&gt;oddsratio att24_pa ;&amp;nbsp;&lt;BR /&gt;ODS OUTPUT PARAMETERESTIMATES=lgsparms ODDSRATIOS=lgsodds;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;ODS OUTPUT OddsRatiosWald=orw;*These are the odds ratios from the oddsratio statement;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;Another solution could be to use dummyvariables for the interaction terms. That work just as well!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;Tine&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 18:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611091#M29578</guid>
      <dc:creator>TineKopp</dc:creator>
      <dc:date>2019-12-11T18:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611092#M29579</link>
      <description>&lt;P&gt;Did you follow the instructions in the blog post - put ODS TRACE ON before/after your code and after and see what the table name is from the log or output? It's the first step.&lt;/P&gt;
&lt;P&gt;You can have multiple ODS OUTPUT statements.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://statgeeks.wordpress.com/2013/08/" target="_blank"&gt;https://statgeeks.wordpress.com/2013/08/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or check the documentation for table names.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_logistic_details112.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_logistic_details112.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most likely it will be Oddsratios, oddsratiosPL or OddsratiosWALD from the table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188254"&gt;@TineKopp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear Reeza&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the link. However, I have already used the ods output statement so the question is what I should call the&amp;nbsp;output object name in order to output odds ratios from the oddsratio statement. I have managed to output the interaction term, but I still need the odds ratios produced by my statement "&lt;SPAN&gt;oddsratio att24_pa" which is the odds ratio of Att24_pa at age=&amp;lt;40 and&amp;nbsp;Att24_pa at age=&amp;gt;=40.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Tine&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 18:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611092#M29579</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-11T18:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611097#M29581</link>
      <description>&lt;P&gt;Yes, thank you! And as I just wrote. If you dont know which table name to use, make dumme variables instead. That gives the same results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best whishes,&lt;/P&gt;&lt;P&gt;Tine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 18:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611097#M29581</guid>
      <dc:creator>TineKopp</dc:creator>
      <dc:date>2019-12-11T18:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to output oddsratio and parameterestimates from interaction terms in proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611104#M29582</link>
      <description>Only in this particular example, in general for output the approach above works on any type of output from SAS PROCS.</description>
      <pubDate>Wed, 11 Dec 2019 18:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-output-oddsratio-and-parameterestimates-from-interaction/m-p/611104#M29582</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-11T18:56:36Z</dc:date>
    </item>
  </channel>
</rss>

