<?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 How do I reverse a continuous main predictor in a proc logistic model? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694044#M211643</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sounds like a very basic problem but I'm running a logistic model where my outcome is binary (yes / no), and my main predictor is continuous. I've modified my variables and code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=imputed_50; 
   class p1 (ref='0') dev (ref='0') euro (ref='1') incom (ref='4') / param=ref; 
   model p1 (event='1')= fer euro dev incom 
                  / covb clodds=wald orpvalue;  
	by _Imputation_;
	ods output ParameterEstimates=Lgsparms; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The variable "fer" is a continuous variable that has values going from 0 to 150. When I run the model, I get Odds Ratios which would be interpreted for example as:&lt;/P&gt;
&lt;P&gt;"For every 1 unit increase of (fer), there is a 40% increase in the odds of attaining (p1)."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My understanding is that the default sorting order when running proc logistic on continuous variables is "Ascending" if I'm not mistaken.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know if it would be possible to reverse this in model, such that the (fer) variable is descending, where the values are interpreted as "For every 1 unit&amp;nbsp;&lt;STRONG&gt;decrease&lt;/STRONG&gt; of (fer)...". I understand doing this would only change the values such that everything will be the opposite. I'm aware there's a descending option but not sure if I can just specify that for the (fer) variable and leave everything else the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Oct 2020 22:02:28 GMT</pubDate>
    <dc:creator>asgee</dc:creator>
    <dc:date>2020-10-24T22:02:28Z</dc:date>
    <item>
      <title>How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694044#M211643</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sounds like a very basic problem but I'm running a logistic model where my outcome is binary (yes / no), and my main predictor is continuous. I've modified my variables and code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=imputed_50; 
   class p1 (ref='0') dev (ref='0') euro (ref='1') incom (ref='4') / param=ref; 
   model p1 (event='1')= fer euro dev incom 
                  / covb clodds=wald orpvalue;  
	by _Imputation_;
	ods output ParameterEstimates=Lgsparms; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The variable "fer" is a continuous variable that has values going from 0 to 150. When I run the model, I get Odds Ratios which would be interpreted for example as:&lt;/P&gt;
&lt;P&gt;"For every 1 unit increase of (fer), there is a 40% increase in the odds of attaining (p1)."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My understanding is that the default sorting order when running proc logistic on continuous variables is "Ascending" if I'm not mistaken.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know if it would be possible to reverse this in model, such that the (fer) variable is descending, where the values are interpreted as "For every 1 unit&amp;nbsp;&lt;STRONG&gt;decrease&lt;/STRONG&gt; of (fer)...". I understand doing this would only change the values such that everything will be the opposite. I'm aware there's a descending option but not sure if I can just specify that for the (fer) variable and leave everything else the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 22:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694044#M211643</guid>
      <dc:creator>asgee</dc:creator>
      <dc:date>2020-10-24T22:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694045#M211644</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;My understanding is that the default sorting order when running proc logistic on continuous variables is "Ascending" if I'm not mistaken.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, I would not phrase it that way. Numerical variables are not "sorted" in my understanding of the word. 150 is always greater than 0, no matter how you want to phrase it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nevertheless, the answer to your question is simple math. If a 1 unit increase in Fer results in a 40% increase in the log odds ratio, then a 1 unit decrease in FER results in a 1 - (1/1.4) (or 28.6%) decrease in the log odds ratio.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 12:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694045#M211644</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-25T12:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694046#M211645</link>
      <description>&lt;P&gt;Create a new variable ifer = - fer; and use that in the model.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 22:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694046#M211645</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-10-24T22:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694058#M211655</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt; ! Thanks for your reply, yes it seems like your code does work. I just have a follow-up question though, since my model is based on an imputed dataset, should I include the (ifer) variable instead of the normal (fer) variable in creating that imputed dataset? &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 25 Oct 2020 00:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694058#M211655</guid>
      <dc:creator>asgee</dc:creator>
      <dc:date>2020-10-25T00:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694069#M211663</link>
      <description>&lt;P&gt;You don't need to change your imputing procedure. You don't even need to create an intermediate dataset. You should create the variable iFer with a programming statement within proc glimmix, before the model statement.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 03:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694069#M211663</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-10-25T03:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694070#M211664</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt; ! Ah okay, that makes sense! I just have one last follow-up question regarding that. In my imputing procedure I included an a-priori interaction term that I want to asses (ex. gender*fer). However in the modelling, you mentioned that I should instead change the (fer) variable to the (ifer). Should I have also created a new interaction term where it's (gender*ifer) instead in my modelling (not in the imputing procedure)? &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 25 Oct 2020 03:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694070#M211664</guid>
      <dc:creator>asgee</dc:creator>
      <dc:date>2020-10-25T03:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694074#M211665</link>
      <description>&lt;P&gt;I don't see why you should be imputing interaction terms. But I might be missing something here. You might try posting this question as a new topic in the Statistical Procedures forum.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 03:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694074#M211665</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-10-25T03:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reverse a continuous main predictor in a proc logistic model?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694076#M211666</link>
      <description>Ah sounds good, ty again!</description>
      <pubDate>Sun, 25 Oct 2020 03:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-reverse-a-continuous-main-predictor-in-a-proc-logistic/m-p/694076#M211666</guid>
      <dc:creator>asgee</dc:creator>
      <dc:date>2020-10-25T03:31:41Z</dc:date>
    </item>
  </channel>
</rss>

