# Simple logistic regresssion question

#### nwigg

##### New Member
I am currently doing a project that requires some simple logistic regression analysis in SAS(version 9.1). For some reason my results seem to be the exact opposite of what I expected. For example, I have higher percentages of various illnesses in group1 in comparison to group2, but in my analysis group1 has odds ratios less than less than 1 for each illness analyzed. I checked and I am referencing the correct outcome variable in my analysis and my exposure variables are coded properly. I'm not sure what has gone wrong with my analysis. Anyone have any recommendations?

#### lumhearts

##### New Member
The exposures are dichotomous too? If so, run 2 x 2 table with odds ratios. This is equivalent and lets you check directly by looking at your cells.

I know you said you checked, but sas models '0' for the dependent and '1' for the independents.

#### jamesmartinn

##### Member
You may be modelling the "0's" in your data set opposed to the "1's".

Proc logistic data = dataset descending;

try that.

#### nwigg

##### New Member
Thanks for your replies. I am doing descending and the logistic regression is modeled for my outcome of interest. I did a proc freq with cmh option and the odds ratios are the same as with the regression.

#### lumhearts

##### New Member
Then it is what it is. It may help you understand if you calculate both odds by hand. Looking at the table and cells a, b, c, and d, compute odds for group 1 = a/c, then odds for group 2 = b/d. You will then see that in fact group 2 has the largest odds of illness. Your odds ratio is (a/c) / (b/d).

#### nwigg

##### New Member
Ok, my professor was telling me something was wrong with my regression and i couldn't find any problems with it. I thought maybe i was missing something. Thanks for your help.

Last edited:

#### lumhearts

##### New Member
One more thing, nwigg.
Check and make sure your coding is right. We know sas is modeling things right - but there is always a chance that the dichotomous coding is backwards. It can happen.

#### nwigg

##### New Member
Very true, I will comb through my code again. Thanks.