- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
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:
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;
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:
"For every 1 unit increase of (fer), there is a 40% increase in the odds of attaining (p1)."
My understanding is that the default sorting order when running proc logistic on continuous variables is "Ascending" if I'm not mistaken.
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 decrease 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.
Any help would be appreciated!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
My understanding is that the default sorting order when running proc logistic on continuous variables is "Ascending" if I'm not mistaken.
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.
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.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Create a new variable ifer = - fer; and use that in the model.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content