- Learn
- Mathematics
- Statistics
- Intermediate Statistics – Regression and ANOVA
- Logistic Regression
Logistic Regression
IntermediateLesson 9 of 10 in Intermediate Statistics – Regression and ANOVA Course
What you will learn
- Move between probabilities, odds and log-odds, and compare two groups with an odds ratio, the quantity that logistic regression is built on.
- Convert between probability, odds and log-oddsExpress the chance of a yes/no outcome as a probability, as odds and as log-odds, and convert in both directions.
- Compare two groups with an odds ratioCalculate and interpret an odds ratio from a two-by-two table, give its confidence interval, and tell it apart from a ratio of probabilities.
- Convert between probability, odds and log-odds
- Explain why binary outcomes need their own model, write the logistic regression equation, and read its coefficients as odds ratios and as predicted probabilities.
- Explain why the logistic model fits a binary outcomeShow where a straight-line model breaks down for a 0/1 outcome and how modeling the log-odds produces an S-shaped curve that stays between 0 and 1.
- Interpret coefficients as odds ratiosRead each coefficient as a change in log-odds, convert it to an odds ratio, and state the effect correctly in words.
- Include categorical predictors and interactionsEnter categorical predictors with dummy variables, choose a reference category, and interpret interaction terms on the odds scale.
- Turn the model into predicted probabilitiesCalculate predicted probabilities from fitted coefficients and explain why a constant odds ratio gives probability changes that vary.
- Explain why the logistic model fits a binary outcome
- Explain how maximum likelihood finds the coefficients, read the coefficient table, and test single predictors and whole models with Wald and likelihood ratio tests.
- Explain maximum likelihood estimationDescribe how logistic regression coefficients are chosen to make the observed outcomes as probable as possible, and what −2 log-likelihood measures.
- Test and interpret individual coefficientsRead the coefficient table from SPSS, jamovi or R, test single coefficients with the Wald test, and build confidence intervals for odds ratios.
- Compare models with likelihood ratio testsTest a whole model or a block of added predictors by comparing −2 log-likelihoods of nested models, and use AIC and BIC to compare models.
- Explain maximum likelihood estimation
- Judge how well a logistic regression fits and classifies, check its assumptions and problem cases, and report the results clearly.
- Judge overall fit with pseudo R² and goodness-of-fit testsCompute and interpret the McFadden, Cox and Snell and Nagelkerke pseudo R² measures, and use the Hosmer–Lemeshow test to check calibration.
- Evaluate predictions with a classification tableBuild and read a classification table, compute accuracy, sensitivity, specificity and predictive values, and explain how the cutoff and the base rate affect them.
- Check assumptions and problem casesCheck the assumptions of logistic regression, the linearity of the logit, multicollinearity, sample size and influential cases, and know which linear regression checks do not apply.
- Report a logistic regressionWrite up the model, its tests, odds ratios, fit and classification in a clear, APA-style report.
- Judge overall fit with pseudo R² and goodness-of-fit tests
- Extend logistic regression to outcomes with three or more categories: unordered categories with multinomial logistic regression and ordered categories with ordinal logistic regression.
- Model unordered categories with multinomial logistic regressionSet up a multinomial logistic regression with a reference category, interpret its odds ratios, and calculate the predicted probability of each category.
- Model ordered categories with ordinal logistic regressionUse the proportional odds model for an ordered outcome, interpret its single odds ratio per predictor and its thresholds, and check the proportional odds assumption.
- Model unordered categories with multinomial logistic regression
Logistic Regression study guide
1Describe binary outcomes with odds and log-odds
Probability, odds, and log-odds describe the same binary outcome on different scales. Moving between them makes the logistic model easier to understand and keeps an odds ratio from being mistaken for a probability ratio. Work from counts to odds, compare two groups, and put uncertainty around that comparison. The event definition and the reference group stay attached to each result so that its direction is clear.
1.1 Convert between probability, odds and log-odds
A yes/no outcome can be described on three scales: probability, odds, and log-odds. Each describes the same event, but the scales support different calculations. Start by naming the event so that every number has a clear meaning.
Define the event
A binary outcome has two categories. Code the modeled event as 1 and the other category as 0. For program completion, 1 means "completed" and 0 means "did not complete." The event is sometimes called a "success," even when it is something unwanted, such as relapse. The mean of a 0/1 variable is the proportion of events, so the quantity being modeled is .
Turn probability into odds
Probability divides events by all cases. Odds divide events by non-events:
If 15 of 50 applicants are accepted, the probability of acceptance is . There are 35 non-events, so the odds are . These are two descriptions of the same results; odds of 0.43 are not a 43% chance.
For a probability of 0.80, the odds are , read "4 to 1." There are four events for each non-event. At probability 0.50, the odds are 1. At probability 0.20, the odds are 0.25. Odds below 1 favor the non-event; odds above 1 favor the event. Odds against reverse the comparison: "4 to 1 against" corresponds to one event among five outcomes, a probability of 0.20.
To go back, divide the odds by one plus the odds:
Odds of 3 give . Odds of 0.25 give .
Take the natural logarithm
The logit, or log-odds, is . Use the natural logarithm, not the base-10 logarithm. For probability 0.80, the logit is . For probability 0.20, it is . Complementary probabilities have opposite logits: .
A zero logit means odds of 1 and probability 0.50. Positive logits mean probabilities above 0.50; negative logits mean probabilities below 0.50. To recover a probability from log-odds , first exponentiate to recover the odds, then convert:
For , this gives .
Why model on a different scale?
Probabilities lie between 0 and 1. Odds run from 0 upward without an upper limit. For probabilities strictly between 0 and 1, log-odds can take any real value. A linear regression expression can therefore describe log-odds without producing an impossible probability. At probability 0 or 1, the logit has no finite value.
Equal changes in logits give unequal probability changes. A move from log-odds 0 to 1 changes probability from 0.50 to about 0.73. A move from 3 to 4 changes it from about 0.95 to 0.98. The conversion is most responsive near the middle of the probability scale.
Key Takeaways
- Name the category coded 1 before calculating a probability or odds.
- Odds are events divided by non-events; probability is events divided by all cases.
- Convert odds to probability with .
- The logit uses the natural logarithm; a zero logit means a probability of 0.50.
- Equal logit changes produce different probability changes at different starting points.
1.2 Compare two groups with an odds ratio
An odds ratio compares the odds of the same event in two groups. It supplies the direction and size of an association that a chi-square test alone does not describe. Both the event and the reference group belong in the interpretation.
Calculate from a two-by-two table
In an online course, 100 learners receive weekly reminders and 100 do not. Completion is the event.
| Group | Completed | Did not complete |
|---|---|---|
| Reminders | 60 | 40 |
| No reminders | 30 | 70 |
The reminder group's odds are . The reference group's odds are . Divide the first by the second:
The completion odds are 3.5 times as high with reminders. More generally, let the first row contain event count and non-event count , and the reference row contain and . Then .
An OR of 1 means equal odds. Values above 1 mean higher odds in the numerator group; values between 0 and 1 mean lower odds. Reversing either the groups or the event gives the reciprocal. Here, no reminders versus reminders gives . Reversing both leaves the original OR unchanged.
Keep odds and probability separate
The completion probabilities are 0.60 and 0.30. Their ratio, the risk ratio, is 2.0, not 3.5. Say "3.5 times the odds," not "3.5 times as likely." The latter wording describes a probability ratio.
For two distinct nonzero probabilities below 1, the OR lies farther from 1 than the risk ratio. The two measures are close when the event is rare in both groups, and can also be close when the probabilities are similar. For example, probabilities 0.51 and 0.50 give a risk ratio of 1.02 and an OR of about 1.04.
Put uncertainty on the log scale
Odds ratios multiply, so confidence intervals are calculated on their natural-log scale. For positive cell counts:
Here the standard error is about 0.299 and . The interval on the log scale is . Exponentiating its two endpoints gives an OR interval of approximately [1.95, 6.29]. It excludes 1, the no-association value. The interval is asymmetric around the OR because exponentiation stretches its upper side.
Pearson's chi-square for this table is , . It tests the association; the OR and interval describe its estimated magnitude and precision.
Connect the table to regression
A logistic model with reminders coded 1 and no reminders coded 0 reproduces the table. Its intercept is and its slope is . Exponentiating the slope returns the OR. Additional predictors extend this comparison while holding those predictors constant.
In a case-control study, the numbers of cases and controls are chosen by design. Outcome probabilities cannot be recovered from those sample proportions alone. The OR remains estimable: the exposure OR comparing cases with controls equals the outcome OR comparing exposure groups, under the study's sampling design.
Key Takeaways
- An OR needs a named event and a reference group.
- For the stated two-by-two table layout, .
- Reversing one comparison gives the reciprocal OR.
- An odds ratio and a risk ratio measure different comparisons.
- Build an OR confidence interval on the log scale, then exponentiate both endpoints.
- A single binary predictor connects the two-by-two table directly to logistic regression.
2Build and interpret the logistic regression model
A logistic model keeps the familiar structure of multiple regression while changing the scale of the outcome. Learn how the logit keeps predicted probabilities in range, how coefficients become odds multipliers, and how reference categories and interactions define a comparison. Then calculate probabilities for realistic predictor profiles and see why an unchanged odds ratio can produce different changes in chance.
2.1 Explain why the logistic model fits a binary outcome
A binary outcome needs a model whose fitted values can be interpreted as probabilities. Logistic regression makes a linear model for the log-odds and then converts those fitted values to probabilities. This preserves a familiar regression structure while respecting the outcome's range.
Why a straight probability line breaks down
A linear probability model fits an ordinary least-squares line directly to the 0/1 outcome. Consider . At it predicts 1.06, which is not a probability. A straight line can leave the allowed range as a predictor increases or decreases.
The random variation also differs from ordinary linear regression. At a fixed predictor value, a binary residual can only be or . Its distribution is not normal, and its variance is , which changes with the probability. Applying the usual normal-error, equal-variance model to these residuals misdescribes them.
Write the logit model
The logistic model is
The expression is the linear predictor. It can take any real value. The logit is the link function because it links probability to that expression. Inverting the link gives
For every finite value of , this probability stays strictly between 0 and 1. When , it equals 0.50. Holding other predictors fixed, a positive slope produces a rising S-shaped probability curve, while a negative slope produces a falling one. A larger absolute slope makes the transition steeper. The curve is steepest where the probability is 0.50.
| Feature | Ordinary linear regression | Binary logistic regression |
|---|---|---|
| Modeled quantity | Mean outcome | Log-odds of the event |
| Typical fitted form | Straight line for the mean | Straight line for log-odds; S-curve for probability |
| Random variation | Normal-error model | Bernoulli outcome with variance |
Read a complete model
Suppose 200 adults join a 12-week exercise program. Completion is coded 1. Distance from home to the gym is measured in kilometers, and partner is coded 1 for a training partner and 0 for none. The fitted model is
The intercept 1.20 describes a person at distance 0 without a partner. Their odds are and their probability is about 0.77. If zero is not a useful predictor value, centering a continuous predictor by subtracting its mean makes zero describe its mean instead. That changes the intercept's interpretation without changing fitted probabilities.
Check the modeled category
For a 0/1 outcome, interpret the probability of category 1. In R, a factor outcome's second level is treated as the event. Check the software's outcome order before reading signs. Reversing a binary outcome negates every coefficient and reciprocates every OR.
Logistic regression does not require normal residuals or equal residual variances. It does require an appropriate relationship between continuous predictors and log-odds. Multiple predictors, dummy variables, and product terms extend the linear predictor just as they extend a multiple-regression equation.
Key Takeaways
- A linear probability model can predict outside [0, 1] and has nonnormal, unequal-variance residuals.
- The logit links probability to a linear predictor.
- The inverse-logit function keeps fitted probabilities between 0 and 1.
- The intercept refers to zero on every predictor, including the reference categories.
- Check the outcome coding before interpreting coefficient signs.
2.2 Interpret coefficients as odds ratios
A logistic coefficient is an additive change in log-odds. Exponentiating it turns that change into a multiplier of the odds, which is usually easier to explain. In a model with several predictors, the comparison holds the other predictors constant.
Read the coefficient on its own scale
In the completion model, distance has coefficient per kilometer. One additional kilometer lowers the log-odds of completing by 0.25, at the same partner status. It does not lower probability by 0.25. The probability change depends on the person's starting probability.
Exponentiating gives the odds ratio:
Each additional kilometer multiplies completion odds by about 0.78. A negative coefficient gives an OR between 0 and 1; a zero coefficient gives OR 1; a positive coefficient gives an OR above 1. Software may call this column Exp(B), exp(coef), or odds ratio.
Express the odds change as a percentage
Use . For distance this is about −22%, so a suitable interpretation is "Each additional kilometer was associated with about 22% lower completion odds, holding partner status constant."
The partner coefficient is 0.90. Its OR is . At the same distance, participants with a partner have about 2.46 times the odds of completing compared with participants without one. The percentage increase is . "246% higher odds" would add an extra baseline amount.
The reverse distance comparison has a different percentage: one kilometer closer multiplies odds by , about 28% higher odds. A decrease of 22% and its reversal are not equal percentage changes because they use different starting odds.
Combine changes by multiplication
For a change of predictor units, the odds multiplier is . Five additional kilometers give
That is about 71% lower odds. It also equals the one-kilometer OR raised to the fifth power, using its unrounded value. Multiplying 0.779 by 5 does not combine the changes correctly. Repeated odds effects multiply; coefficient effects add on the log scale.
Keep the predictor's units attached
If distance is recorded in meters, one unit is much smaller. The coefficient becomes −0.00025 per meter and its OR is about 0.99975. The underlying association is unchanged: 1,000 meters still produce the same multiplier as one kilometer. ORs for differently scaled predictors cannot be compared as though their one-unit changes were equivalent.
With several predictors, these are adjusted odds ratios. A crude OR from a two-by-two table can differ from the adjusted OR. State what was adjusted for, and do not treat adjustment alone as evidence of a causal effect.
Translate odds carefully
At 4 km, the fitted completion probabilities are about 0.75 with a partner and 0.55 without. Their probability ratio is about 1.36, even though the partner OR is 2.46. The sentence "2.46 times as likely to complete" confuses these two scales. To discuss chance directly, calculate and report the relevant predicted probabilities.
Key Takeaways
- changes log-odds; multiplies odds.
- An adjusted OR holds the other model predictors constant.
- The percentage odds change is .
- A change of units has OR .
- Attach units to a continuous-predictor OR.
- Use predicted probabilities when explaining changes in chance.
2.3 Include categorical predictors and interactions
Categorical predictors enter a logistic model through comparisons with a reference category. An interaction adds a different kind of comparison: it asks whether one predictor's association changes with another predictor. Both are interpreted on the log-odds scale first.
Choose and code a reference category
A binary predictor can enter as 0/1. Its coefficient compares category 1 with category 0. With three or more categories, use one fewer dummy variable than there are categories. A three-category membership variable needs two indicators.
Let basic membership be the reference. Define standard as 1 for standard members and 0 otherwise, and premium as 1 for premium members and 0 otherwise. Basic members have both indicators set to 0. If their fitted coefficients are 0.40 and 1.10:
| Comparison | Log-odds difference | Odds ratio |
|---|---|---|
| Standard versus basic | 0.40 | 1.49 |
| Premium versus basic | 1.10 | 3.00 |
| Premium versus standard | 2.01 |
All comparisons hold the model's other predictors constant. For two non-reference categories, subtract their coefficients in the intended direction and exponentiate. Dividing their ORs gives the same result when unrounded values are used.
Entering arbitrary nominal codes 1, 2, and 3 as a single numeric predictor imposes equal log-odds steps between categories. Nominal labels do not support that constraint. Dummy coding allows each category's comparison to be estimated separately.
Changing the reference changes the coefficient labels and values, but not the fitted probabilities, likelihood, or overall fit. Check the software default: the first or last category may be used. To test whether membership matters overall, test both dummy coefficients together on 2 degrees of freedom. One nonsignificant row does not settle the overall question.
Add an interaction
Extend the completion model to
where is distance in kilometers and is partner status, with 1 for a partner. For participants without a partner, and the distance slope is −0.25. For participants with a partner, collect the distance terms: .
The distance OR is therefore without a partner and with a partner. Exponentiating the interaction gives , the ratio of those ORs. It is not an extra probability of 0.10.
Interpret the component coefficients locally
In this interaction model, 0.90 is the partner difference at distance 0. At distance , the partner log-odds difference is . The distance coefficient −0.25 describes the group with partner status 0. Centering distance at a meaningful value makes the partner main effect refer to that value.
Even without a product term, probability differences can vary between groups or across distance. The inverse-logit curve is nonlinear. A product term tests a change in association on the log-odds scale; unequal probability differences alone do not establish such an interaction.
Key Takeaways
- A predictor with categories needs reference-category indicators.
- Compare two non-reference categories by subtracting their coefficients.
- Reference changes preserve fitted probabilities and overall fit.
- Test all indicators together for a categorical predictor’s overall contribution.
- An exponentiated product coefficient is a ratio of odds ratios.
- With an interaction, component effects refer to zero on the other interacting predictor.
- Varying probability differences can occur without a log-odds interaction.
2.4 Turn the model into predicted probabilities
A fitted logistic equation becomes useful for prediction after two separate operations. First calculate its linear predictor. Then apply the inverse-logit function. Keeping those steps separate helps prevent a log-odds value from being reported as a probability.
Substitute the complete predictor profile
For exercise-program completion, use
where distance is in kilometers, and means a training partner. Completion is the event. For a participant at 4 km with a partner:
This is a log-odds value. Exponentiating gives odds of about 3.00. Convert to a probability:
For a participant at the same distance without a partner, set . The linear predictor is 0.20 and the fitted probability is about 0.550. Every predictor needs its correct value, including zeros for reference categories. A product term, when present, also needs the product of the participant's values.
Compare profiles on the probability scale
At 10 km, the linear predictors are −1.30 without a partner and −0.40 with a partner. The probabilities are about 0.214 and 0.401. The partner difference is about 0.187 there, compared with about 0.201 at 4 km. These are probability differences, or about 19 and 20 percentage points, respectively.
The partner OR stays at every distance in this model. A fixed odds multiplier does not produce a fixed probability difference. Its effect depends on the starting position on the S-curve.
Without a partner, moving from 2 to 3 km changes the fitted probability from about 0.668 to 0.611, a drop of about 0.058. Moving from 10 to 11 km changes it from about 0.214 to 0.175, a drop of about 0.039. Both changes add −0.25 to log-odds, but the first occurs closer to the curve's steep center.
Locate the middle of the curve
A fitted probability of 0.50 means . Without a partner, solve to obtain 4.8 km. With a partner, solve to obtain 8.4 km. At greater distances, the fitted probability is below 0.50.
For a continuous predictor with constant coefficient , the local probability slope is . Its largest absolute value occurs at and equals . This is the divide-by-4 rule. With , the steepest local decrease is 0.0625 per kilometer, about 6 percentage points. Actual finite changes are obtained by predicting at both endpoints.
Explain what a prediction means
A probability of 0.75 means an expected event proportion of about three in four among people with that predictor profile. It does not determine an individual's outcome. Choose realistic profiles within the observed predictor ranges when communicating results; extreme extrapolations can turn a fitted equation into an unsupported comparison. Carry unrounded values through the calculation and round only the displayed results.
Key Takeaways
- Calculate the complete linear predictor before converting it to probability.
- Use to invert the logit.
- A constant OR can produce varying probability differences.
- The fitted probability is 0.50 wherever the linear predictor is zero.
- The divide-by-4 rule describes the steepest local probability slope.
3Estimate and test a logistic regression
Logistic regression estimates coefficients by maximizing the likelihood of the observed outcomes. Follow that idea into the output: convergence, standard errors, Wald tests, and confidence intervals. Compare whole models or planned blocks of predictors with likelihood ratio tests, then use information criteria to weigh fit against complexity. The choice of test and the cases included in each model matter to the conclusion.
3.1 Explain maximum likelihood estimation
Logistic regression chooses coefficients by asking how well they account for the actual sequence of events and non-events. Maximum likelihood estimation, or MLE, selects the coefficient values that make those observed outcomes most probable under the model.
Build a likelihood from cases
For a case whose outcome is 1, the model contributes its event probability . For a case whose outcome is 0, it contributes . With independent observations, multiply these contributions:
For example, an intercept-only model for seven completions and three non-completions has likelihood . At it is about 0.000977; at 0.60, about 0.00179; at 0.70, about 0.00222; and at 0.80, about 0.00168. The maximum occurs at 0.70, the observed proportion. A candidate probability closer to 1 does not necessarily fit better, because it makes the three non-events harder to explain.
Work with log-likelihood
Products of many probabilities become very small. Taking their natural logarithm turns the product into a sum without changing which coefficients maximize it:
For the seven-of-ten example, the maximum log-likelihood is about −6.11. Log-likelihoods for individual 0/1 observations are nonpositive; values closer to zero indicate a better fit to the same data.
Software often reverses the direction by reporting −2 log-likelihood, written . Here it is about 12.22, and smaller is better. For individual Bernoulli observations, this is also the residual deviance. With grouped binomial counts, residual deviance is measured relative to the grouped saturated model, so it need not equal the displayed .
Understand iterations and convergence
With predictors, there is no general closed-form expression for the MLE coefficients. Software starts with trial values and improves them through repeated updates, using an algorithm such as Newton–Raphson or iteratively reweighted least squares. Convergence means those updates have met the stopping rule. Check the convergence messages before interpreting the coefficient table.
In well-behaved large samples, coefficient estimates have approximately normal sampling distributions. Their estimated standard errors support Wald tests and confidence intervals. A small sample or a sparse outcome category can make that approximation unreliable.
Recognize separation
Complete separation occurs when a predictor or combination perfectly separates the outcomes. If every participant with a partner completes and every participant without one does not, increasing the partner coefficient keeps improving the likelihood. A finite ordinary MLE does not exist.
Quasi-complete separation can occur when all partner participants complete, while participants without partners include both outcomes. Part of the data is perfectly predicted, and some estimates still diverge. Very large coefficients, enormous standard errors, nonconvergence, or warnings about probabilities numerically equal to 0 or 1 require investigation.
Inspect sparse cross-tabulations and coding. Possible responses include collecting more informative data, merging categories when their meanings justify it, or using a penalized approach such as Firth logistic regression. MLE maximizes the likelihood; it does not minimize squared residuals or maximize an ordinary regression R².
Key Takeaways
- MLE maximizes the likelihood of the observed event and non-event outcomes.
- Log-likelihood has the same maximizer as likelihood.
- For the same observations, larger LL and smaller −2LL indicate better fit.
- Check convergence before trusting estimates.
- Separation can prevent finite ordinary maximum-likelihood estimates.
- Sparse outcomes weaken large-sample Wald approximations.
3.2 Test and interpret individual coefficients
A coefficient table combines an estimated association with its uncertainty. Read the estimate, standard error, test, odds ratio, and confidence interval together. A small p-value by itself does not say that the association is large.
Calculate a Wald test
The Wald test compares a coefficient with zero by dividing by its standard error:
For distance in the completion model, and , giving . Squaring gives a Wald chi-square of 17.36 on 1 degree of freedom, with . For partner, and give and Wald chi-square 6.61, .
The signed z statistic preserves the direction of the estimate. Its square loses that sign but produces the same two-sided p-value through a chi-square reference distribution with 1 degree of freedom.
Build an odds-ratio interval
First form an interval for the coefficient, then exponentiate both endpoints:
For distance, the coefficient interval is approximately [−0.368, −0.132]. Exponentiation gives OR 0.78, 95% CI [0.69, 0.88]. For partner, the coefficient interval is [0.214, 1.586], giving OR 2.46, 95% CI [1.24, 4.88].
The OR interval is asymmetric because exponentiation is nonlinear. Do not calculate using the coefficient's standard error. Exponentiating the standard error alone also does not create a standard error for the OR. A two-sided Wald interval excluding 1 corresponds to a two-sided Wald test significant at .05, subject to rounding.
Match labels across programs
| Quantity | SPSS | R | jamovi |
|---|---|---|---|
| Coefficient | B | Estimate | Estimate |
| Standard error | S.E. | Std. Error | SE |
| Test | Wald chi-square | z value | Z |
| p-value | Sig. | Pr(> | z |
| Odds ratio | Exp(B) | Exponentiate coefficients | Odds ratio option |
In R, summary(model) displays the coefficient tests and exp(coef(model)) produces ORs for a fitted glm object. Request odds-ratio confidence intervals explicitly in graphical software. Check whether an interval is a Wald or profile-likelihood interval before expecting exact agreement with a Wald test.
For a categorical predictor with several indicators, a row tests one category against the reference. An overall test requires all its indicators together. A four-category predictor normally contributes 3 degrees of freedom to a joint test, not one.
Judge precision and test reliability
An OR of 1.05 can have a tiny p-value in a huge sample, while an OR of 3 can have a wide interval crossing 1 in a small sample. Report magnitude and precision alongside significance.
Near separation, a coefficient and its standard error can both become enormous. The standard error can grow so fast that the Wald statistic becomes small despite a strong association. This is the Hauck–Donner effect. Investigate the fit; likelihood ratio tests and profile-likelihood intervals are generally preferable to ordinary Wald inference in such cases, with separation itself addressed when estimates do not exist.
Key Takeaways
- The Wald z statistic is ; its square has a 1-df chi-square reference distribution.
- Construct a coefficient interval before exponentiating its endpoints.
- The no-association value for an OR interval is 1.
- A categorical predictor needs a joint test of its indicators.
- Interpret the OR and its precision alongside the p-value.
3.3 Compare models with likelihood ratio tests
A model comparison asks whether extra predictors improve fit enough to justify their extra parameters. The likelihood ratio test answers this for nested models. Information criteria offer a different comparison by balancing fit against model size.
Begin with an intercept-only model
The null model gives every participant the same fitted probability. In the exercise example, 120 of 200 adults complete, so the null probability is 0.60. Its intercept is and its negative twice log-likelihood is
This is the baseline fit to beat. It accounts for the overall event frequency without distinguishing participants by their predictors.
Subtract fits in the correct direction
Two models are nested when the smaller can be obtained by fixing added coefficients in the larger to zero. For models fitted by MLE to the same cases, calculate
The degrees of freedom equal the number of added free parameters. The distance-and-partner model has . Against the null model, the improvement is on 2 degrees of freedom, . This overall result says the predictors improve fit jointly.
To test partner beyond distance, compare the distance-only value 232.00 with 224.60. The difference is 7.40 on 1 degree of freedom, . This is a block comparison with just one added coefficient. A three-category factor would add two coefficients and use 2 degrees of freedom.
SPSS calls the overall comparison "Omnibus Tests of Model Coefficients." In R, anova(model0, model1, test = "Chisq") compares nested fitted models. A block test and an individual Wald test often give similar results in large samples but need not match exactly.
Keep the data constant
A comparison fails if the models were fitted to different observations. Adding a predictor with missing values can silently shrink the sample. Select the common complete cases first, then fit both models to that same set. Matching sample sizes alone is insufficient if the identities of the cases differ.
Penalize extra parameters with AIC and BIC
Let count every estimated parameter, including the intercept, and count cases:
The two-predictor model has three parameters, so AIC is . Distance alone has two parameters, so AIC is . Their BIC values are about 240.49 and 242.60. Both criteria favor the two-predictor model here.
Lower information criteria are better. They are not p-values and do not have a significance cutoff. They can compare non-nested models when the response, likelihood basis, and fitted cases are comparable. BIC imposes a larger per-parameter penalty than AIC when .
Choose predictor blocks for substantive reasons. Automatic forward or backward selection repeatedly searches the same data, which can exaggerate selected effects and make ordinary p-values too optimistic. A planned comparison makes the scientific question behind the model change clear.
Key Takeaways
- Compare nested models fitted to the same cases with a likelihood ratio test.
- Subtract larger-model −2LL from smaller-model −2LL.
- Test degrees of freedom count added parameters.
- A significant overall test establishes improvement over the null model.
- AIC and BIC penalize parameters, including the intercept; lower is better.
- Use a substantive plan for predictor blocks.
4Assess fit, classification and assumptions
A fitted model can improve on the null model without giving accurate probabilities or useful classifications. Read fit, calibration, and classification as separate pieces of evidence. Check whether the observations and predictors support the model, investigate influential cases, and turn the results into a report with clear coding, units, uncertainty, and comparison groups. Each statistic should answer a recognizable question.
4.1 Judge overall fit with pseudo R² and goodness-of-fit tests
Model fit has several meanings. A model can improve on an intercept-only model, assign sensible probabilities, and still classify many people incorrectly. Separate overall improvement, calibration, and discrimination when reading fit output.
Read pseudo R² by name
Logistic regression has no least-squares split into explained and unexplained variance. Its pseudo R² measures summarize likelihood improvement using different scales. They are not proportions of outcome variance explained.
For the completion model, the null is 269.20, the fitted is 224.60, the likelihood ratio chi-square is 44.60, and there are 200 cases.
| Measure | Calculation | Value |
|---|---|---|
| McFadden | .166 | |
| Cox and Snell | .200 | |
| Nagelkerke | Cox and Snell divided by its attainable maximum | .270 |
McFadden's value can also be obtained as . Cox and Snell gives . Its maximum for these data is . Nagelkerke rescales by this maximum, giving about .
The same fitted model produces all three numbers. Report "Nagelkerke R² = .27," for example, not "the model explained 27% of the variance." Compare models fitted to the same data using the same named measure. Benchmarks from ordinary linear regression do not transfer directly.
Check calibration
Calibration asks whether observed event proportions match predicted probabilities. If people predicted near 0.70 have an observed event proportion near 0.70, that part of the probability scale is well calibrated.
The Hosmer–Lemeshow test sorts cases by their fitted probabilities and forms groups, commonly ten. It compares observed and expected event and non-event counts within those groups. With groups, its usual chi-square reference has degrees of freedom.
Suppose the result is , . There is no detected evidence of poor calibration. A significant result would flag disagreement, so the direction of a desirable p-value differs from the overall model test.
A nonsignificant result does not establish that every fitted probability is accurate. The test can miss problems in small samples and flag small differences in large samples. Ties and choices about grouping can also change the result. Examine a calibration plot showing observed proportions against predictions to see where and how much they differ.
Distinguish the questions
The likelihood ratio test asks whether the predictors improve fit beyond the null model. Calibration asks whether probability levels are accurate. Discrimination asks whether event cases tend to receive higher predictions than non-event cases.
For example, a constant prediction equal to the event proportion can be calibrated overall, yet cannot rank any two participants. Conversely, predictions can rank participants usefully while being systematically too high. Use evidence that answers the particular question, instead of treating one favorable statistic as a complete model evaluation.
Key Takeaways
- Name the pseudo R² measure and avoid a variance-explained interpretation.
- Cox and Snell has a data-dependent maximum below 1; Nagelkerke rescales it.
- Calibration compares predicted probabilities with observed proportions.
- A significant Hosmer–Lemeshow result flags poor calibration.
- Overall improvement, calibration, and discrimination answer different questions.
4.2 Evaluate predictions with a classification table
A predicted probability becomes a category only after a cutoff is chosen. A classification table records how those categories match the observed outcomes. Different summaries use different denominators, so identify the group each rate describes before calculating it.
Read the table
Completion is the event. At cutoff 0.50, classify a participant as a completer when their fitted probability is at least 0.50.
| Observed outcome | Predicted completion | Predicted non-completion | Total |
|---|---|---|---|
| Completed | 102 | 18 | 120 |
| Did not complete | 30 | 50 | 80 |
| Total | 132 | 68 | 200 |
The 102 are true positives and the 50 are true negatives. The 30 are false positives, and the 18 are false negatives. Accuracy is . Predicting completion for everyone would already be correct for 60% of participants, so compare 76% with that majority-category baseline.
Condition on the observed outcome
Sensitivity asks what fraction of actual events were predicted as events: . Specificity asks what fraction of actual non-events were predicted as non-events: . The false positive rate is .
These rates use rows of this table. Sensitivity is not the fraction of positive predictions that were correct; that question uses a different denominator.
Condition on the prediction
The positive predictive value is : among predicted completers, about 77% completed. The negative predictive value is : among predicted non-completers, about 74% did not complete. These use columns.
Predictive values depend on how common the event is in the population. An apparently strong positive predictive value in one setting can change in a setting with a different event frequency. Accuracy also needs context: when only 5% are events, predicting no event for everyone gives 95% accuracy but zero sensitivity.
Change the cutoff deliberately
Raising the cutoff to 0.70 reduces predicted positives. Suppose 84 of 120 completers and 64 of 80 non-completers are then correct. Sensitivity falls to 0.70, specificity rises to 0.80, accuracy becomes 0.74, and positive predictive value becomes 0.84. The model's fitted probabilities have not changed; the decision rule has.
Choose a cutoff with the consequences of false positives and false negatives in mind. Lowering it cannot reduce sensitivity or increase specificity on the same predictions, although ties can leave a rate unchanged.
Look across cutoffs
The ROC curve plots sensitivity against the false positive rate across possible cutoffs. AUC summarizes ranking: it is the probability that a random event case receives a higher prediction than a random non-event case, plus half the probability of a tie. A constant prediction gives AUC 0.50; perfect ranking gives 1.
AUC describes discrimination across cutoffs, not calibration or accuracy at one chosen cutoff. Classification measured on the cases used to fit the model tends to overstate performance on new cases, particularly when the model has many parameters relative to the available data.
Key Takeaways
- Accuracy counts all correct classifications, but needs a majority-category baseline.
- Sensitivity and specificity condition on the observed outcome.
- Predictive values condition on the predicted category and depend on event frequency.
- Raising the cutoff trades sensitivity for specificity.
- The ROC curve summarizes cutoff tradeoffs.
- AUC measures ranking and gives half-credit for ties.
4.3 Check assumptions and problem cases
A usable coefficient table depends on the data structure and the model being appropriate. Check the observations, predictors, and individual cases as well as the printed fit statistics. Logistic regression has its own assumptions; normal residuals and equal residual variances are not among them.
Check the observations and information available
Verify the binary outcome coding and inspect counts in both categories. Observations must be independent for an ordinary logistic model. Repeated measurements on one person or participants grouped within schools need an analysis that accounts for dependence. Ignoring clustering can make standard errors too small.
Count parameters, not just variable names, when assessing data demands. A factor with four categories uses three coefficients. A common planning rule asks for at least ten cases in the less frequent outcome category per slope coefficient. The example has 80 non-completers and two slopes, or 40 per coefficient. This is a rough guide, not a guarantee: required information also depends on effect sizes, predictor patterns, and the purpose of the model.
Cross-tabulate categorical predictors against the outcome. Empty or very small cells can produce separation or unstable estimates. Merge categories only when their meanings support doing so.
Check continuous predictors on the logit scale
A model with one linear term for a continuous predictor assumes a linear relationship with log-odds, not with probability. The Box–Tidwell approach adds alongside . A significant added term signals that the simple linear-logit form needs attention. A transformation or polynomial term can represent a nonlinear pattern.
The logarithm requires strictly positive values. For a variable containing zeros or negatives, a positive shift must be explicitly chosen and documented before forming this term. The result depends on the shifted scale; do not silently add a constant and treat the transformation as scale-free. Inspecting the fitted relationship provides useful context for the test.
Check relationships among predictors
Perfect multicollinearity prevents unique coefficient estimates. Strong but imperfect multicollinearity inflates standard errors and makes coefficients unstable. VIF depends on the predictors, so it can be obtained from regressions among those predictors. VIF above 10, or tolerance below 0.10, is a common serious-warning guideline, not a universal decision threshold.
Investigate unusual and influential cases
Residuals compare observed 0/1 outcomes with fitted probabilities. Pearson and deviance residuals help identify surprising cases. They do not have a normal distribution for individual binary observations. For an event case predicted at 0.10, the Pearson residual is ; that can happen under a correctly specified model.
Leverage flags unusual predictor profiles. Average leverage is for slopes; two or three times that average is a screening guideline. Cook's distance summarizes overall influence, with values above 1 a common flag. DFBETAS describes a standardized change in a particular coefficient when one case is omitted; absolute values above 1 are another screening guideline. Raw DFBeta uses the coefficient's units, so the same cutoff is not transferable to it.
Inspect flagged records for errors and examine how conclusions change when the model is refitted without them. A valid unusual observation remains evidence. Document any exclusion and its reason instead of deleting cases simply to obtain a preferred result.
Key Takeaways
- Check independence, binary coding, and information in both outcome categories.
- Continuous linear terms assume linearity of the logit.
- Box–Tidwell terms require a strictly positive, documented predictor scale.
- Multicollinearity can make coefficient estimates unstable.
- Use residuals, leverage, and influence together to investigate cases.
- Influence guidelines are screening tools; case deletion needs a substantive reason.
- Normal-residual and equal-variance checks do not apply to binary logistic outcomes.
4.4 Report a logistic regression
A useful report lets readers identify the event, reconstruct the comparisons, and judge the uncertainty. Link the model's numerical results to clear statements about the outcome. State enough about coding and units that a positive coefficient has only one possible interpretation.
Describe what was fitted
Begin with the binary outcome and its modeled category, predictors and units, reference categories, sample size, and event count. Identify maximum likelihood as the estimation method. For example:
"A binary logistic regression modeled completion of a 12-week exercise program (1 = completed, 0 = did not complete) for 200 adults, including 120 completers. Distance was measured in kilometers; partner status used no partner as the reference. Coefficients were estimated by maximum likelihood."
Include relevant assumption checks and explain meaningful problems, such as sparse categories, nonconvergence, or influential records, and how they were handled.
Report overall fit and coefficients
For the example, write: "The predictors improved fit over the intercept-only model, , , Nagelkerke ." The pseudo R² is named so that its scale is clear. If a calibration check was used, add its result: "The Hosmer–Lemeshow test did not detect poor calibration, , ."
A coefficient table should give the estimate, standard error, test statistic, p-value, OR, and confidence interval:
| Predictor | b | SE | Wald chi-square | p | OR | 95% CI |
|---|---|---|---|---|---|---|
| Distance, per km | −0.25 | 0.06 | 17.36 | < .001 | 0.78 | [0.69, 0.88] |
| Partner, yes versus no | 0.90 | 0.35 | 6.61 | .010 | 2.46 | [1.24, 4.88] |
Interpret a central result in words: "Each additional kilometer was associated with about 22% lower completion odds, adjusting for partner status." For partner, say "2.46 times the odds," preserving both the event and the comparison group.
Add understandable probabilities and classification
Predicted probabilities can make the odds results easier to understand: "At 4 km, the fitted completion probability was .75 with a partner and .55 without one." These describe specific profiles, so give their predictor values.
If classification is reported, state its cutoff and baseline: "At cutoff .50, accuracy was 76%, compared with a 60% majority-category baseline; sensitivity was .85 and specificity was .63." Accuracy alone hides the difference between identifying completers and identifying non-completers.
Apply APA number conventions
Write p-values without a leading zero, such as . Use for very small values; software's .000 is rounded output, not a zero probability. Odds ratios can exceed 1 and keep a leading zero, as in OR = 0.78. Put confidence intervals in square brackets and usually display test statistics to two decimals. Preserve sensible precision in calculations before rounding the report.
For observational data, describe associations. Adjustment does not by itself establish that a predictor causes the outcome. "Was associated with higher odds" describes what the fitted model estimates, while a causal sentence needs evidence from the research design.
Key Takeaways
- State event coding, units, reference groups, sample size, and estimation method.
- Report overall fit and name the pseudo R² measure.
- Give coefficients, uncertainty, tests, ORs, and confidence intervals.
- Use odds language for ORs and predictor profiles for probability comparisons.
- Pair classification rates with the cutoff and baseline.
- APA p-values omit a leading zero; ORs retain one.
5Model outcomes with more than two categories
Outcomes with several categories require a choice about how those categories relate. For unordered choices, compare each category with a reference and calculate a full probability distribution. For ordered ratings, use cumulative comparisons and shared slopes. The reference choice, coefficient sign convention, and proportional odds assumption determine how the output is read; category probabilities make those comparisons concrete.
5.1 Model unordered categories with multinomial logistic regression
Some outcomes have more than two categories with no natural order. Multinomial logistic regression models these categories together through comparisons with one reference outcome. The fitted category probabilities form a complete distribution that sums to 1.
Set up baseline-category logits
Suppose usual travel to work is car, bike, or public transportation. Choose car as the reference. With distance in kilometers, write
These are baseline-category logits. With outcome categories, there are equations. With predictor coefficients in each equation, including any indicator or product terms in that count, there are parameters including intercepts. Here, two equations each have an intercept and a slope, for four parameters.
Interpret a category comparison
Let the bike slope be −0.30 and the public-transportation slope be 0.05. Each extra kilometer multiplies the bike-versus-car probability ratio by , and the public-transportation-versus-car ratio by . These are also called category-versus-reference odds ratios, and some software labels them relative risk ratios.
Neither is a multiplier of the unconditional probability of that category. All categories compete for a total probability of 1. For bike versus public transportation, subtract the slopes: . The corresponding multiplier is per kilometer. Changing the reference category changes the coefficients, not the fitted probabilities.
Normalize all category probabilities
Take intercepts 1.5 and 0.2. Then and . Set . The probabilities are
At 5 km, the logits are 0 and 0.45, giving probabilities about 0.28, 0.28, and 0.44. At 10 km, they are −1.5 and 0.70, giving about 0.31, 0.07, and 0.62. The car probability changes little because the alternatives move in opposite directions. Applying the binary inverse logit to each equation separately would fail to normalize the full distribution.
Extend tests and check the choice structure
A single continuous predictor contributes one slope to each equation. Its overall likelihood ratio test therefore has degrees of freedom. Each equation also has coefficient-level Wald tests; pseudo R² and classification summaries extend the binary ideas.
The model's independence of irrelevant alternatives assumption says that the odds between two categories do not depend on which other alternatives are available. Closely substitutable alternatives can challenge that assumption. More categories also mean more parameters and a greater need for data in each category. Separate pairwise binary fits generally yield different estimates and need not produce probabilities that sum to 1.
Key Takeaways
- Use multinomial logistic regression for unordered outcomes with three or more categories.
- Choose one reference outcome and fit baseline-category logits.
- Compare two non-reference categories by subtracting their coefficient vectors.
- Normalize all exponentiated logits with a shared denominator.
- An overall predictor test counts its coefficients across all equations.
- The independence of irrelevant alternatives assumption concerns available choices.
5.2 Model ordered categories with ordinal logistic regression
An ordered outcome carries information that an unordered model ignores. Ratings such as poor, fair, and good have a clear order, but the gaps need not be equal. Ordinal logistic regression uses that order through cumulative comparisons.
Split the ordered categories at each cut point
With three categories, there are two cumulative comparisons: poor versus fair or good, and poor or fair versus good. For cut point , the cumulative probability is . Its logit compares being at or below that cut point with being above it.
One common proportional odds equation is
Each cut point has its own threshold , but all share the same predictor coefficient . With categories and slopes, the model has parameters. The thresholds are ordered intercept-like cut points, not effects of predictors.
Track the sign convention
Under the displayed minus-sign convention, a positive coefficient shifts outcomes toward higher categories. It decreases the log-odds of being at or below each cut point. Exponentiating gives the multiplier for the reverse, higher-versus-lower cumulative odds.
R's polr uses this convention. Some programs or texts put a plus sign before the predictor expression. In that form a positive coefficient shifts outcomes toward lower categories. Read the equation and category order before interpreting a sign; the symbol alone is not enough.
Recover the individual probabilities
Let the thresholds be 0.5 and 2.0, and let tutorial attendance have coefficient 0.8, with attendance coded 1. For non-attenders, the cumulative logits are 0.5 and 2.0. Applying the inverse logit gives approximately 0.622 and 0.881.
The probability of poor is the first cumulative probability, 0.622. Fair is the difference, . Good is the complement of the second, .
For attenders, subtract 0.8 from each threshold. The cumulative logits are −0.3 and 1.2, giving cumulative probabilities about 0.426 and 0.769. The category probabilities are therefore about 0.426 for poor, 0.343 for fair, and 0.231 for good. Subtract cumulative probabilities in order; treating both cumulative values as individual categories would double-count poor ratings.
Interpret and check proportional odds
The shared higher-versus-lower OR is . Attendance multiplies the odds of fair or good versus poor by 2.23, and also the odds of good versus poor or fair by 2.23. It is not the odds of moving exactly one category up.
The proportional odds assumption is this common coefficient across cut points. The test of parallel lines or Brant test checks it. A significant result flags differences, but large samples can detect small departures. Compare cut-point estimates to judge their practical importance. If the assumption clearly fails, a partial proportional odds model can relax selected common slopes, or a multinomial model can treat the categories without the proportional constraint.
Key Takeaways
- Ordinal models use category order without requiring equal spacing.
- A -category model has cumulative cut points.
- The displayed minus-sign convention makes positive slopes favor higher categories.
- Get middle-category probabilities by subtracting cumulative probabilities.
- Proportional odds means the same cumulative OR at every cut point.
- Check the proportional odds assumption and investigate meaningful departures.
Logistic Regression examples
1From event counts to an odds comparison
11 steps
- 1IntroductionStart with a named event
An assessment records a pass or a non-pass for each learner. We will call passing the event, coded 1. Non-passing is coded 0.
Follow the counts through probability, odds, and log-odds, then compare two preparation groups. The numerical scale changes at each step, but the event stays fixed. That lets the final comparison keep a clear direction.
- 2ExampleUse all cases for probability
Among 40 learners using a study planner, 24 pass and 16 do not. The event probability is
The denominator includes every learner in this group. A probability of 0.60 means 60% of the group passed. Before switching scales, identify the other count: 16 non-events, representing probability 0.40. Both parts are needed to calculate odds.
- 3ExampleUse non-events for odds
The planner group has 24 passes for every 16 non-passes. Its passing odds are
These odds are above 1 because passing is more common than non-passing. They can exceed 1 without a problem: an odds value compares two parts of the group, while a probability compares one part with the whole. Odds of 1.5 do not mean a probability of 150%.
- 4ChallengeConvert back before interpreting
A different group has passing odds of 0.40. What is its passing probability?
---reveal---
Use . Passing is less common than non-passing in this group. Reporting 0.40 as the probability would use the odds value without changing its denominator. The complementary non-pass probability is about 0.714, and their ratio recovers odds 0.40.
- 5ExplanationTake the natural log
For the planner group, the log-odds are . This value is positive because its passing probability exceeds 0.50.
If we reverse the event to non-passing, the odds become and the log-odds become about −0.405. Complementary event probabilities therefore have opposite logits. Software uses the natural logarithm in this transformation.
- 6Key InsightWhy the logit can be a line
Probabilities must remain between 0 and 1, but finite logits have no fixed upper or lower limit. A regression line can model log-odds and still return valid probabilities after conversion.
The conversion bends the line into an S-curve. A one-unit logit increase moves probability most strongly near 0.50 and less strongly near the extremes. Equal steps on one scale need not be equal steps on another.
- 7ExampleBuild a second group comparison
Among 40 learners without a planner, 12 pass and 28 do not. Their passing odds are . The planner-versus-no-planner OR is
The planner group has 3.5 times the passing odds. Both row totals happen to equal 40, but the odds calculation still uses the non-pass counts within each group, not those row totals.
- 8ExplanationSeparate odds from risk
The passing probabilities are 0.60 with a planner and 0.30 without one. Their risk ratio is , while their OR is 3.5.
The sentence "Planner users had 3.5 times the passing odds" matches the OR. "Planner users were twice as likely to pass" matches the risk ratio. These ratios describe the same table but use different quantities, so their wording must keep the distinction.
- 9ExamplePut an interval around the OR
For counts 24, 16, 12, and 28, the log-OR standard error is
The log OR is about 1.253. Form and exponentiate the endpoints. This gives an OR interval of approximately [1.39, 8.84]. It excludes equal odds, but its width shows substantial uncertainty about the magnitude of the association.
- 10ChallengeReverse a comparison and its scale
A learner writes: "Without a planner, learners had 3.5 times the chance of passing." Correct both the comparison direction and the scale, using the table above.
---reveal---
For no planner versus planner, the passing OR is . The passing probability ratio is . A correct sentence is "Learners without a planner had about 0.286 times the passing odds," or "half the passing probability."
- 11RecapKeep the denominator in view
Use the denominator to keep the scales straight: probability uses all cases, odds use non-events, and an OR divides one group’s odds by another’s. Taking the natural log prepares the odds for a linear model.
In the planner example, passing probability 0.60 becomes odds 1.5 and log-odds about 0.405. The group comparison is OR 3.5, with an asymmetric interval formed by exponentiating a log-scale interval.
2Interpret a workshop-attendance model
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFollow the model’s scales
- 2ExplanationWrite the attendance equation
- 3ExampleInterpret the zero profile
- 4ChallengeIdentify the modeling problem
- 5ExampleExponentiate a session slope
- 6ExampleCombine several session changes
- 7ChallengeRead the reverse contrast
- 8ExplanationAdd workshop formats as indicators
- 9ExampleCompare the two alternatives
- 10ExampleLet the session effect depend on reminders
- 11ChallengeFind where a reminder has no effect
- 12ExampleCalculate a profile’s logit first
- 13ExampleNow convert the logit
- 14Key InsightThe probability effect has a center
- 15ChallengeUse a probability target
- 16ChallengeChoose the correct prediction equation
- 17RecapMatch the result to the comparison
3Read and compare likelihood-based results
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionAsk how the estimates were chosen
- 2ExampleLet non-events count too
- 3ExplanationTranslate the fit direction
- 4ChallengeRecognize a failed finite estimate
- 5ExampleRead a coefficient and its test
- 6ExampleCarry the interval onto the odds scale
- 7ChallengeSeparate precision from magnitude
- 8ExampleCompare a whole model
- 9ExampleTest an added block
- 10TipHold the observations constant
- 11ExampleAdd the AIC penalty
- 12ChallengeCompare different decision rules
- 13ChallengeRespond to a misleading Wald result
- 14RecapRead fit and uncertainty together
4Evaluate a quality-review model
18 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionEvaluate several kinds of success
- 2ExplanationName what pseudo R² summarizes
- 3ExampleDistinguish calibration from improvement
- 4ChallengeRead a goodness-of-fit result
- 5ExampleIdentify the four cell counts
- 6ExampleCompute accuracy with a baseline
- 7ExampleCondition on the actual outcome
- 8ExampleCondition on the decision
- 9ChallengeWork backward from a sensitivity change
- 10Key InsightUse AUC for ranking
- 11ExplanationCheck the observation structure
- 12ExplanationCheck the predictor shape
- 13ExampleCombine diagnostics for one case
- 14ChallengeCount the information per coefficient
- 15ExampleState what the model compares
- 16TipAttach the decision rule to the rates
- 17ChallengeRepair an incomplete performance claim
- 18RecapChoose evidence for each question
5Choose and interpret a multicategory model
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionLet the category structure guide you
- 2ExplanationChoose a baseline outcome
- 3ExampleCalculate the category weights
- 4ExampleNormalize the whole choice set
- 5ChallengeCompare two non-reference categories
- 6ConnectionQuestion the available alternatives
- 7ExplanationUse the order without equal gaps
- 8ExampleStart with cumulative probabilities
- 9ExampleSubtract to isolate a category
- 10ExampleApply one common coefficient
- 11ChallengeInterpret the shared OR
- 12TipCheck signs and parallel slopes
- 13ChallengeChoose the model and count terms
- 14RecapRecover the complete outcome distribution
Logistic Regression practice questions
Set 1: Coefficients, categories, and predictions10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Probability, odds, and the event10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Likelihood, uncertainty, and model comparisons10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Fit, classification, and diagnostics10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Several outcome categories10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 6: Put the evidence together10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Accuracy
Adjusted odds ratio
AIC
APA statistical reporting
AUC
B
Base rate
Baseline-category logit
Bernoulli variable
BIC
Binary logistic regression
Binary outcome
Box–Tidwell check
C
Calibration
Case-control study
Centering
Classification table
Complete separation
Confidence interval
Convergence
Cook’s distance
Cox and Snell’s R²
Cumulative logit
Cutoff
D
DFBETAS
Divide-by-4 rule
Dummy variable
E
Event coding
Event probability
Extrapolation
H
Hauck–Donner effect
Hosmer–Lemeshow test
I
Independence of irrelevant alternatives
Independent observations
Interaction
L
Leverage
Likelihood
Likelihood ratio test
Linear predictor
Linear probability model
Linearity of the logit
Link function
Log-likelihood
Logistic coefficient
Logit
M
Maximum likelihood estimation
McFadden’s R²
Model chi-square
Multicollinearity
Multinomial logistic regression
N
Nagelkerke’s R²
Natural logarithm
Negative predictive value
Nested models
Nominal outcome
Normalization
Null model
O
Odds
Odds multiplier
Odds ratio
Ordinal logistic regression
P
Pearson residual
Percentage point
Positive predictive value
Predicted probability
Predictor block
Probability difference
Product term
Profile-likelihood interval
Proportional odds
Pseudo R²
Q
Quasi-complete separation
R
Ratio of odds ratios
Reference category
Residual deviance
Risk ratio
ROC curve
S
Sensitivity
Specificity
Standard error
Statistical association
Stepwise selection
T
Test of parallel lines
Threshold
V
VIF
W
Wald confidence interval
Wald test
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.