I ran some chi-square tests for a binary dependent variable and other binary independent variables. Now I'd like to build a model using all of the independent variables in proc logistic; however, I've been trying to run proc logistic on the dependent variable and one of the independent variables to see if the odds ratio corresponds to the odds ratio I got using the chi-square test. After reading about proc logistic and trying several different code iterations, I haven't been able to get the same odds ratio. Although I've been programming in SAS for years, my stats experience is limited and I feel like I'm missing something.
Here's my code for chi-square and proc logistic:
proc freq data=statsSetup;
tables refGroup*RiskFactor/ chisq relrisk nocol nopercent;
run;
proc logistic data=statsSetup;
class RiskFactor (ref='1') /param=ref;
model refGroup = RiskFactor /RISKLIMITS CTABLE ;
run;
* I'm trying to model the probability of the non-reference group (refGroup=0);
Any help is appreciated.
Thanks,
Ryan