🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Quartz | Level 8

## Logistic Regression with One Variable vs Multiple Variables

Attached is the cross tab of my dependent variable DONOR and independent variable BEC. If someone is in the BEC then they seem to donate 18.67 times more than if someone is not in the BEC.  I ran a logistic regression:

proc logistic data=work.work;
class BEC (ref='0');
model donor(event='1') = BEC;
run;

and came up with 18.67 odds ratio and a C statistic of .50

Then, I included 19 more variables and ran the logistic regression again.  This time, the odds ratio was .426 and the c statistic was .77.

Is something wrong with my model? It doesn't seem like .426 makes sense if you look at the cross tab.

Thank you for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

## Re: Logistic Regression with One Variable vs Multiple Variables

By including other potential predictors of Donor in the model, along with your BEC predictor, the resulting parameter estimate and odds ratio estimate for BEC tells you the effect of BEC after adjusting for the effects of the other predictors.  If some of the other predictors in the model are associated with the Donor response, this gives you a better idea of what the separate effect of BEC is after accounting for those other predictors.  As Rick says, the effect of BEC will obviously change if you change the other predictors that are being adjusted for by adding or deleting predictors from the model.

7 REPLIES 7
Super User

## Re: Logistic Regression with One Variable vs Multiple Variables

That is 2x2 contingency table, you should not put PROC LOGISTIC on this data, use PROC FREQ or CATMOD instead.

``````data class;
set sashelp.class;
x=age>14;
run;
proc freq data=class;
table sex*x/ relrisk riskdiff;
run;``````
Quartz | Level 8

## Re: Logistic Regression with One Variable vs Multiple Variables

Wouldn't proc logistic tell me the odds if  my dependent variable is binary = Donor (0/1) and then i have a dummy variable?

Super User

## Re: Logistic Regression with One Variable vs Multiple Variables

If you only include one independent variable, that is called perfect predicted model.

Model would not  be trusted .

Quartz | Level 8

## Re: Logistic Regression with One Variable vs Multiple Variables

That makes sense since the c statistic was .50 which seems like a flip of a coin.  I added more variables and it showed an odds ratio of .426 which would mean that if someone was IN the BEC then they have .42 times less liklihood of being a donor.  Does this coincide with the cross tab referece though?

SAS Super FREQ

## Re: Logistic Regression with One Variable vs Multiple Variables

These are very different models. If several of the other 19 variables are correlated with BEC, they will explain much of the same variation as BEC. Also, when you include continuous variables, the odds ratio for BEC is now calculated at the mean value of the continuous variables. In short, you should not expect the odds ratio for BEC in the 20-variable model to match the odds ratio in the one-variable model.

Quartz | Level 8

## Re: Logistic Regression with One Variable vs Multiple Variables

Ah this makes a lot of sense!! I took out two continuous variables and was left with only 18 binary variables and the output gave me 3.5 odds ratio which makes more sense. If i want to include continuous varibales in ivs' should I run a separate logistic regression model with only continuous iv?

SAS Super FREQ

## Re: Logistic Regression with One Variable vs Multiple Variables

By including other potential predictors of Donor in the model, along with your BEC predictor, the resulting parameter estimate and odds ratio estimate for BEC tells you the effect of BEC after adjusting for the effects of the other predictors.  If some of the other predictors in the model are associated with the Donor response, this gives you a better idea of what the separate effect of BEC is after accounting for those other predictors.  As Rick says, the effect of BEC will obviously change if you change the other predictors that are being adjusted for by adding or deleting predictors from the model.

Discussion stats
• 7 replies
• 1998 views
• 2 likes
• 4 in conversation