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
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?
Hi Paige,
Proc logistic data=doit descending simple;
class....../param=ref;
model immigrant (event="immigrant")=......;
run;
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.
Yes I understand but not 1/odds.
It is completely the opposite across all variables.
D
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.
model immigrant (event="NOimmigrant")
I have included the glogit option and it gave me the right results. I am not sure why though. Very confusing.
D
I mean using another LEVEL of Y in your event= option .
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!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.