PROC LOGISTIC DATA=SAS-data-set < options > ;
MODEL response = independents < / options >;
BY variables;
OUTPUT <OUT=SAS-data-set>
<keyword=name ... keyword=name>
/ <ALPHA=value>;
WEIGHT variable;
data ingots; input heat soak r n @@; datalines; 7 1.0 0 10 7 1.7 0 17 7 2.2 0 7 7 2.8 0 12 7 4.0 0 9 14 1.0 0 31 14 1.7 0 43 14 2.2 2 33 14 2.8 0 31 14 4.0 0 19 27 1.0 1 56 27 1.7 4 44 27 2.2 0 21 27 2.8 1 22 27 4.0 1 16 51 1.0 3 13 51 1.7 0 1 51 2.2 0 1 51 2.8 0 1 ; proc logistic data=ingots; model r/n = heat soak; output out=results p=predict;
proc plot hpercent=50;
plot predict * heat
predict * soak ;
The output from the LOGISTIC procedure is shown in Figure 1. The Score statistic and - 2
% log % L in the section "Criteria for Assessing Model
Fit" test the joint significance of the independent variables
(also called covariates in logistic regression). The combined
effect of HEAT and SOAK is highly significant. However, under
"Analysis of Maximum Liklihood Estimates", we see that
HEAT is significant, while SOAK is not.
The LOGISTIC Procedure
Data Set: WORK.INGOTS
Response Variable (Events): R
Response Variable (Trials): N
Number of Observations: 19
Link Function: Logit
Response Profile
Ordered Binary
Value Outcome Count
1 EVENT 12
2 NO EVENT 375
Criteria for Assessing Model Fit
Intercept
Intercept and
Criterion Only Covariates Chi-Square for Covariates
AIC 108.988 101.302 .
SC 112.947 113.177 .
-2 LOG L 106.988 95.302 11.686 with 2 DF (p=0.0029)
Score . . 15.123 with 2 DF (p=0.0005)
Analysis of Maximum Likelihood Estimates
Parameter Standard Wald Pr > Standardized
Variable Estimate Error Chi-Square Chi-Square Estimate
INTERCPT -5.6600 1.1740 23.2426 0.0001 .
HEAT 0.0832 0.0243 11.7351 0.0006 0.455521
SOAK 0.0939 0.3450 0.0740 0.7856 0.048549
Association of Predicted Probabilities and Observed Responses
Concordant = 69.8% Somers' D = 0.504
Discordant = 19.3% Gamma = 0.566
Tied = 10.9% Tau-a = 0.030
(4500 pairs) c = 0.752
Figure 1: Output from LOGISTIC procedure
(edited)
Note: For logistic regression with a binary response, PROC LOGISTIC yields parameter estimates which are the negative of those produced by the former LOGIST procedure. In LOGIST, the EVENT or response variable must be coded 0/1, and the parameters produced are for estimating Pr(EVENT=1). In LOGISTIC, the response variable can be character or numeric, and, by default, LOGISTIC estimates the probability of the smallest response, Pr(EVENT=0) if 0/1 coding is used.