<?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 estimate Relative Risk using a Multinomial Logistic Regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/422182#M280885</link>
    <description>&lt;P&gt;If something is new, find a fully worked example, ensure you can replicate the results and then try and apply it to your data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here’s the one for what you’re looking for.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/57/798.html" target="_blank"&gt;http://support.sas.com/kb/57/798.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calling a macro is the same as using a function in Excel. You put the right things in the function and you get results.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Learning to use one is very straightforward, writing them is a different story. There no qualifications required to run macros besides a willingness to try it.&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/157230"&gt;@suze152&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello SAS friends,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please bear with me, I am a coding beginner and am not qualified to invoke macros. I use SAS Studio, University Edition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a categorical response variable with 4 levels (DENV_CNTL2, levels 1, 3, 4, 5).&lt;BR /&gt;I have a continuous predictor variable (RBP4_ADJC).&lt;/P&gt;
&lt;P&gt;Additional predictor variables include (Age, continuous; Sex, binary; Fever, binary).&lt;BR /&gt;&lt;BR /&gt;I would like to run a multinomial logistic regression first with only 1 continuous predictor variable. I would like to run subsequent models&amp;nbsp;with the additional predictor variables (categorical and continuous).&lt;BR /&gt;&lt;BR /&gt;I have read that it's possible to estimate relative risk with PROC LOGISTIC using the %NLEstimate macro. I am having trouble writing the f or fdata parameters of this macro based on my variables. I have also never used a macro.&lt;BR /&gt;&lt;BR /&gt;The code is below, and the output is attached.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;PROC LOGISTIC DATA=Suze.ECData;&lt;BR /&gt;CLASS DENV_CNTL2 (ref = 1) / param = ref;&lt;BR /&gt;MODEL DENV_CNTL2=RBP4_ADJC / RL&amp;nbsp;link=glogit;&lt;BR /&gt;STORE OUT=NLE;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;%NLEstimate(INSTORE=NLE,&amp;nbsp;f=..... ???)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you kindly!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suze&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2017 01:59:24 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-12-19T01:59:24Z</dc:date>
    <item>
      <title>How to estimate Relative Risk using a Multinomial Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/422171#M280884</link>
      <description>&lt;P&gt;Hello SAS friends,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please bear with me, I am a coding beginner and am not qualified to invoke macros. I use SAS Studio, University Edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a categorical response variable with 4 levels (DENV_CNTL2, levels 1, 3, 4, 5).&lt;BR /&gt;I have a continuous predictor variable (RBP4_ADJC).&lt;/P&gt;&lt;P&gt;Additional predictor variables include (Age, continuous; Sex, binary; Fever, binary).&lt;BR /&gt;&lt;BR /&gt;I would like to run a multinomial logistic regression first with only 1 continuous predictor variable. I would like to run subsequent models&amp;nbsp;with the additional predictor variables (categorical and continuous).&lt;BR /&gt;&lt;BR /&gt;I have read that it's possible to estimate relative risk with PROC LOGISTIC using the %NLEstimate macro. I am having trouble writing the f or fdata parameters of this macro based on my variables. I have also never used a macro.&lt;BR /&gt;&lt;BR /&gt;The code is below, and the output is attached.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;PROC LOGISTIC DATA=Suze.ECData;&lt;BR /&gt;CLASS DENV_CNTL2 (ref = 1) / param = ref;&lt;BR /&gt;MODEL DENV_CNTL2=RBP4_ADJC / RL&amp;nbsp;link=glogit;&lt;BR /&gt;STORE OUT=NLE;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;%NLEstimate(INSTORE=NLE,&amp;nbsp;f=..... ???)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you kindly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suze&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 00:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/422171#M280884</guid>
      <dc:creator>suze152</dc:creator>
      <dc:date>2017-12-19T00:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to estimate Relative Risk using a Multinomial Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/422182#M280885</link>
      <description>&lt;P&gt;If something is new, find a fully worked example, ensure you can replicate the results and then try and apply it to your data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here’s the one for what you’re looking for.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/57/798.html" target="_blank"&gt;http://support.sas.com/kb/57/798.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calling a macro is the same as using a function in Excel. You put the right things in the function and you get results.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Learning to use one is very straightforward, writing them is a different story. There no qualifications required to run macros besides a willingness to try it.&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/157230"&gt;@suze152&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello SAS friends,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please bear with me, I am a coding beginner and am not qualified to invoke macros. I use SAS Studio, University Edition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a categorical response variable with 4 levels (DENV_CNTL2, levels 1, 3, 4, 5).&lt;BR /&gt;I have a continuous predictor variable (RBP4_ADJC).&lt;/P&gt;
&lt;P&gt;Additional predictor variables include (Age, continuous; Sex, binary; Fever, binary).&lt;BR /&gt;&lt;BR /&gt;I would like to run a multinomial logistic regression first with only 1 continuous predictor variable. I would like to run subsequent models&amp;nbsp;with the additional predictor variables (categorical and continuous).&lt;BR /&gt;&lt;BR /&gt;I have read that it's possible to estimate relative risk with PROC LOGISTIC using the %NLEstimate macro. I am having trouble writing the f or fdata parameters of this macro based on my variables. I have also never used a macro.&lt;BR /&gt;&lt;BR /&gt;The code is below, and the output is attached.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;PROC LOGISTIC DATA=Suze.ECData;&lt;BR /&gt;CLASS DENV_CNTL2 (ref = 1) / param = ref;&lt;BR /&gt;MODEL DENV_CNTL2=RBP4_ADJC / RL&amp;nbsp;link=glogit;&lt;BR /&gt;STORE OUT=NLE;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;%NLEstimate(INSTORE=NLE,&amp;nbsp;f=..... ???)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you kindly!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suze&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 01:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/422182#M280885</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-19T01:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to estimate Relative Risk using a Multinomial Logistic Regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/423535#M280886</link>
      <description>&lt;P&gt;Dear Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply and helpful link. I have been following your suggested link and the example in the "Using PROC LOGISTIC and the NLEstimate macro" section.&lt;BR /&gt;&lt;BR /&gt;I have not been able to find an example&amp;nbsp;using a continuous predictor variable. How will a continuous predictor variable change the application of the&amp;nbsp;NLEstimate macro?&lt;BR /&gt;&lt;BR /&gt;I would like some guidance on how to write the datalines for the&amp;nbsp;data set specified in the &lt;STRONG&gt;fdata=fd&lt;/STRONG&gt; NLEstimate macro parameter. Please see the "shownames" in the screenshot attached.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am also unsure of my degrees of freedom parameter in the NLEstimate macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data fd;&lt;BR /&gt;length label f $32767;&lt;BR /&gt;infile datalines delimiter='|';&lt;BR /&gt;input label f;&lt;BR /&gt;datalines;&lt;BR /&gt;P(3)/P(1)| exp(b_p1+b_p4)&lt;BR /&gt;P(4)/P(1)| exp(b_p2+b_p5)&lt;BR /&gt;P(5)/P(1)| exp(b_p3+b_p6)&lt;BR /&gt;P(3)/P(4)| exp(b_p1+b_p4-b_p2-b_p5)&lt;BR /&gt;P(3)/P(5)| exp(b_p1+b_p4-b_p3-b_p6)&lt;BR /&gt;P(4)/P(5)| exp(b_p2+b_p5-b_p3-b_p6);&lt;BR /&gt;&lt;BR /&gt;%NLEstimate(instore=NLE, fdata=fd, df=?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suze&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 02:07:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-estimate-Relative-Risk-using-a-Multinomial-Logistic/m-p/423535#M280886</guid>
      <dc:creator>suze152</dc:creator>
      <dc:date>2017-12-26T02:07:18Z</dc:date>
    </item>
  </channel>
</rss>

