data hsb2; set hsb2; hiwrite = (write >=52); run;
Let's now take a look at a model with both a continuous variable math and a categorical variable female as predictors. We will focus on how to interpret the parameter estimate for the continuous variable.
proc logistic data = hsb2 Desc (the same effect as event='1'); model hiwrite (event='1') = female math /clodds=wald; units math = 5; output out = m2 p = prob xbeta = logit; run; proc template; /*display parameter estimates with more decials */ define table Stat.Logistic.ParameterEstimates; dynamic NRows; column Variable GenericClassValue Response DF Estimate StdErr WaldChiSq ProbChiSq StandardizedEst ExpEst Label; define Estimate; header = "Estimate"; parent = Stat.Logistic.vbest8; format = 20.8 ; end; end ; run ; Proc Logistic Data=A Descending; Model Y=X1 X2 X3 X4; Test X1=0; *Tests H0:Beta1=0; Test X1=X2=0; *Tests H0: Beta1=Beta2=0; Test X1=X2; *Tests H0: Beta1=Beta2; run;
Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq
Intercept 1 -10.3651 1.5535 44.5153 <.0001 FEMALE 1 1.6304 0.4052 16.1922 <.0001 MATH 1 0.1979 0.0293 45.5559 <.0001
Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits FEMALE 5.106 2.308 11.298 MATH 1.219 1.151 1.291
Wald Confidence Interval for Adjusted Odds Ratios Effect Unit Estimate 95% Confidence Limits MATH 5.0000 2.689 2.018 3.584
The interpretation for the parameter estimate of math is very similar to that for the categorical variable female. In terms of logit scale, we can say that for every unit increase in the math score, the logit will increase by .198, holding everything else constant. We can also say that for a one unit increase in math score, the odds of scoring 51 or higher in writing test increases by (1.219-1)*100% = 22%.You may wonder what's the relationship between the parameter estiamte math=0.1979 and the odd ratio math=1.219. click the following picture to see more clear explanation.
We can compare the linear predictions and the probabilities in terms of the math scores for the males and females.
proc sort data = m2; by math; run;
symbol1 i = join v=star l=32 c = black; symbol2 i = join v=circle l = 1 c=black; proc gplot data = m2; plot logit*math = female; plot prob*math = female; run; quit;Acknowledgement: The tutorial is based on the notes from: www.ats.ucla.edu.