<?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 export odds ratios, confidence interval and P-value from porc logistic model Macro? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414945#M280091</link>
    <description>&lt;P&gt;Use ODS TRACE on before your PROC LOGISTIC and see what output you want the underlying data from and use ODS OUTPUT on the relevant&amp;nbsp;output.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2017 20:39:03 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-11-20T20:39:03Z</dc:date>
    <item>
      <title>How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414939#M280090</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a macro for univariate logistic regression analysis. How do I export the odds ratio, 95% C.I. and p-value from each of the below model? Should I add ods output statement in the macro? Thank you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro CDR_diff(x=);&lt;BR /&gt;proc logistic data=cdr_df1;&lt;BR /&gt;class &amp;amp;x;&lt;BR /&gt;where visitnum=1;&lt;BR /&gt;model cdr_dfcat2= &amp;amp;x / expb;&lt;BR /&gt;run;&lt;BR /&gt;%mend CDR_diff;&lt;BR /&gt;%CDR_diff(x=sex);&lt;BR /&gt;%CDR_diff(x=ethnic1);&lt;BR /&gt;%CDR_diff(x=race1);&lt;BR /&gt;%CDR_diff(x=smoke2);&lt;BR /&gt;%CDR_diff(x=alcohol1);&lt;BR /&gt;%CDR_diff(x=marital1);&lt;BR /&gt;%CDR_diff(x=educ1);&lt;BR /&gt;%CDR_diff(x=employ1);&lt;BR /&gt;%CDR_diff(x=educ_yrs1);&lt;BR /&gt;%CDR_diff(x=income1);&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414939#M280090</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2017-11-20T20:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414945#M280091</link>
      <description>&lt;P&gt;Use ODS TRACE on before your PROC LOGISTIC and see what output you want the underlying data from and use ODS OUTPUT on the relevant&amp;nbsp;output.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414945#M280091</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-11-20T20:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414946#M280092</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Should I add ods output statement in the macro?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, and you should look at the PERSIST option within that.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here's a very related question that was recently posted:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/multiple-logistic-models-output-odds-ratios/m-p/413512/highlight/true#M21685" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/multiple-logistic-models-output-odds-ratios/m-p/413512/highlight/true#M21685&lt;/A&gt;&lt;/SPAN&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/140136"&gt;@Denali&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a macro for univariate logistic regression analysis. How do I export the odds ratio, 95% C.I. and p-value from each of the below model? Should I add ods output statement in the macro? Thank you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro CDR_diff(x=);&lt;BR /&gt;proc logistic data=cdr_df1;&lt;BR /&gt;class &amp;amp;x;&lt;BR /&gt;where visitnum=1;&lt;BR /&gt;model cdr_dfcat2= &amp;amp;x / expb;&lt;BR /&gt;run;&lt;BR /&gt;%mend CDR_diff;&lt;BR /&gt;%CDR_diff(x=sex);&lt;BR /&gt;%CDR_diff(x=ethnic1);&lt;BR /&gt;%CDR_diff(x=race1);&lt;BR /&gt;%CDR_diff(x=smoke2);&lt;BR /&gt;%CDR_diff(x=alcohol1);&lt;BR /&gt;%CDR_diff(x=marital1);&lt;BR /&gt;%CDR_diff(x=educ1);&lt;BR /&gt;%CDR_diff(x=employ1);&lt;BR /&gt;%CDR_diff(x=educ_yrs1);&lt;BR /&gt;%CDR_diff(x=income1);&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414946#M280092</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-20T20:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414957#M280093</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I successfully output the odds ratio and confidence interval for the individual model using the "&lt;SPAN&gt;ods output OddsRatios(persist)=Oddsratio ModelInfo(persist)=mf;" statement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But everytime I ran another predictor variable or another model, the odds ratio in the out was replaced. How do I keep all the odds ratios in one output file? For example, I need to run 10 models. How do I keep all 10 odds ratios and confidence intervals in the oddsratio file?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods trace on;&lt;BR /&gt;%macro CDR_diff(x=);&lt;BR /&gt;ods output OddsRatios(persist)=Oddsratio ModelInfo(persist)=mf;&lt;BR /&gt;proc logistic data=cdr_df1;&lt;BR /&gt;class &amp;amp;x;&lt;BR /&gt;where visitnum=1;&lt;BR /&gt;model cdr_dfcat2= &amp;amp;x / expb;&lt;BR /&gt;run;&lt;BR /&gt;ods output close;&lt;BR /&gt;%mend CDR_diff;&lt;BR /&gt;%CDR_diff(x=sex);&lt;BR /&gt;%CDR_diff(x=ethnic1);&lt;BR /&gt;%CDR_diff(x=race1);&lt;BR /&gt;%CDR_diff(x=smoke2);&lt;BR /&gt;%CDR_diff(x=alcohol1);&lt;BR /&gt;%CDR_diff(x=marital1);&lt;BR /&gt;%CDR_diff(x=educ1);&lt;BR /&gt;%CDR_diff(x=employ1);&lt;BR /&gt;%CDR_diff(x=educ_yrs1);&lt;BR /&gt;%CDR_diff(x=income1);&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414957#M280093</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2017-11-20T21:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414958#M280094</link>
      <description>&lt;P&gt;Review the options for PERSIST.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, have you considered transposing your data and just using a BY with a single PROC LOGISTIC call? Seems more efficient to me.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414958#M280094</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-20T21:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414967#M280095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the transpose statement but it did not work. Could you please check my code? Thank you!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro CDR_diff(y=);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods output OddsRatios(persist)=ORCI ModelInfo(persist)=mf;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=cdr_df1;&lt;BR /&gt;class &amp;amp;y;&lt;BR /&gt;where visitnum=12;&lt;BR /&gt;model cdr_dfcat2= &amp;amp;y / expb;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc transpose data=ORCI out=Odds;&lt;BR /&gt;by &amp;amp;y;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output close;&lt;BR /&gt;%mend CDR_diff;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%CDR_diff(y=sex);&lt;BR /&gt;%CDR_diff(y=ethnic1);&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414967#M280095</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2017-11-20T21:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to export odds ratios, confidence interval and P-value from porc logistic model Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414975#M280096</link>
      <description>&lt;P&gt;That's not what I meant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean, transpose your data before the logistic regression and then use a single PROC LOGISTIC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a blog post that details the approach.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's really a better way to go.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 22:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-odds-ratios-confidence-interval-and-P-value-from/m-p/414975#M280096</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-20T22:15:03Z</dc:date>
    </item>
  </channel>
</rss>

