StatLabStudent EditionUser guideGalleryFeaturesAbout

Binary logistic regression

Predicts a two-category outcome (yes/no, pass/fail) from numeric and categorical predictors, reporting odds ratios.

Menu: Analyze → Regression → Binary Logistic…

When should I use it?

What are the assumptions?

How do I run it in StatLab?

  1. Move the outcome to Dependent and the predictors to Covariates.
  2. List categorical predictors under Categorical covariates (indicator coding, last or first category as reference).
  3. Keep Hosmer-Lemeshow and CI for exp(B); change the classification cutoff only with a reason.
  4. Choose Method = Forward or Backward (LR or Wald) for automatic selection: variables enter by the score test (entry probability .05) and leave by the likelihood-ratio or Wald test (removal probability .10). Categorical covariates enter and leave as one block.

How do I read the output?

OutputMeaning
Dependent Variable EncodingWhich value is the event (coded 1).
Block 0The constant-only model and score tests for the predictors.
Omnibus TestsChi-square test of the whole model.
Model Summary-2 log likelihood, Cox & Snell and Nagelkerke R².
Hosmer and Lemeshow TestSig. > .05 means no evidence of poor fit.
Classification TablePercentage correctly classified at the cutoff.
Variables in the EquationB, S.E., Wald, Sig., Exp(B) (odds ratio) with its confidence interval.
Model if Term Removed / Variables not in the Equation (stepwise)At each step: how much -2LL would rise if a variable left, and the score test for each variable still outside.

Worked example

On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:

PROC glmLogistic /dep=smoker /covs=(age score educ) /cats=(educ) /method=enter /pin=0.05 /pout=0.1 /ref=last /hl=YES /ci=YES /cut=0.5 /casewise=NO /save=NO.

Output tables: Case Processing Summary · Dependent Variable Encoding · Categorical Variables Codings · Classification Table · Variables in the Equation · Variables not in the Equation · Omnibus Tests of Model Coefficients · Model Summary · Hosmer and Lemeshow Test · Contingency Table for Hosmer and Lemeshow Test · Classification Table · Variables in the Equation.

How would I report it in APA style?

A binary logistic regression predicted Smoker (N = 150). The model was not statistically significant, χ²(5) = 3.97, p = .554, Nagelkerke R² = .037, and classified 69.3% of cases correctly; the Hosmer-Lemeshow test was χ²(8) = 10.28, p = .246. age: OR = 0.99, 95% CI [0.96, 1.01], p = .345; score: OR = 1.02, 95% CI [0.97, 1.07], p = .463; educ(1): OR = 1.04, 95% CI [0.39, 2.74], p = .943; educ(2): OR = 0.67, 95% CI [0.23, 2.01], p = .479; educ(3): OR = 0.55, 95% CI [0.20, 1.49], p = .238.

Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.

What are common mistakes?

Open StatLab   All guide topics