BookmarkSubscribeRSS Feed
dfarid
Calcite | Level 5

Hello,

 

I am having opposite odds ration results when I use the proc surveylogistic than the proc logistics. I am not understanding why. I tried proc logistic with descending option and the results are opposite to the surveylogistic one/ My outcome is binary. 

 

this is the code:

 

proc surveylogistic data=doit; 

class age sex income marital immigrant/ param=ref;

model immigrant (event="immigrant")= age sex income marital;

stratum province ;

weight weights; 

run; 

 

Thank you for the help.

 

DF

 

 

8 REPLIES 8
PaigeMiller
Diamond | Level 26

Show us the PROC LOGISTIC code.

 

Specifically, what are you using for the EVENT= option in PROC LOGISTIC?

 

How are you handling the stratification in PROC LOGISTIC?

--
Paige Miller
dfarid
Calcite | Level 5

Hi Paige,

 

Proc logistic data=doit descending simple;

class....../param=ref;

model immigrant (event="immigrant")=......;

run; 

PaigeMiller
Diamond | Level 26

So in PROC LOGISTIC, you have no WEIGHT statement like you do in PROC SURVEYLOGISTIC, and you also are not handling the stratification in PROC LOGISTIC.

 

So, I don't see any reason to expect the odds ratios to be the same.

--
Paige Miller
dfarid
Calcite | Level 5

Yes I understand but not 1/odds. 

It is completely the opposite across all variables.

 

D

PaigeMiller
Diamond | Level 26

I'll stick with my previous answer.

 

If PROC SURVEYLOGISTIC uses weights and stratification, and PROC LOGISTIC does not, the highly weighted data in PROC SURVEYLOGISTIC could have very low weights in PROC LOGISTIC; and so on.

--
Paige Miller
Ksharp
Super User

model immigrant (event="NOimmigrant")

dfarid
Calcite | Level 5

I have included the glogit option and it gave me the right results. I am not sure why though. Very confusing.

 

D

Ksharp
Super User

I mean using another LEVEL of Y in your event= option .

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 597 views
  • 0 likes
  • 3 in conversation