A Practical Guide to Logistic Regression Using Stata

Alan Acock’s book, A Practical Guide to Logistic Regression Using Stata, is written for students and researchers who are new to logistic regression and who want to focus on applications rather than theory. This guide teaches when and why logistic regression is appropriate, how to easily fit these models by using Stata, and how to interpret and present the results.

 

The book begins with a review of OLS regression and an introduction to the concepts of logistic regression. It compares and contrasts these two methods and explains why logistic regression is usually the better approach to modeling binary outcome data. Along the way, readers will learn about parameter estimation for logistic regression models.

 

The author then turns his attention to interpreting the models and assessing model fit. The book demonstrates how to transform the coefficients into more interpretable odds ratios and how to estimate relative risks when appropriate. Acock next explains tools such as the pseudo-R², likelihood-ratio tests, Akaike’s information criterion (AIC), and Schwarz’s Bayesian information criterion (BIC) and shows how to use these tools to assess the fit of the model to the data.

 

Subsequent chapters focus on assessing a model’s predictive utility using sensitivity, specificity, and receiver operating characteristic (ROC) curves. These concepts are explained clearly and demonstrated with practical examples.

 

The book concludes with a detailed discussion of how to build models with different kinds of predictor variables, how to use Stata‘s margins command to transform the model coefficients to predicted probabilities, and how to use marginsplot to create easily interpretable visualizations of the results. The author includes many examples using continuous and categorical predictors, illustrates various interactions between different predictor variables, and explains complications that may arise, such as multicollinearity.

 

A Practical Guide to Logistic Regression Using Stata provides a comprehensive, applications-oriented introduction to modeling binary outcomes using logistic regression. Readers at all levels will learn the skills to confidently fit, assess, interpret, and visualize these models using their own data.

List of figures
List of tables
List of boxes
Preface (PDF)
Acknowledgments
1 WHAT WE CAN DO WITH LOGISTIC REGRESSION
Questions we can answer using logistic regression
Ways to report results
Using Stata
2 GETTING READY
Opening the dataset
Exploring the data
Labeling values for categorical variables
Saving the edited dataset
3 CONVENTIONAL ORDINARY LEAST-SQUARES REGRESSION
What OLS regression can tell us
What logistic regression can tell us

Robust and cluster–robust estimation

An imperfect model
Clustered sample design
4 INTERPRETING AN ODDS RATIO
What is an odds ratio?
Interpreting ORs as a percentage difference for binary predictors
5 WHAT IS WRONG WITH ORDINARY LEAST-SQUARES REGRESSION FOR A BINARY OUTCOME?
Hypothetical data
How does logistic regression fit better than ordinary least-squares linear regression?
6 FITTING AND INTERPRETING LOGISTIC REGRESSION MODELS
Interpreting coefficients and odds ratios
Fitting logistic regression models with multiple predictors
Interpreting ORs for quantitative predictors
Selecting the right base level for categorical predictors
7 HOW WELL DOES THE MODEL FIT THE DATA?
Pseudo-R² measures of fit
Information criteria
Identifying cases that the model fits poorly
8 SENSITIVITY AND SPECIFICITY 
Criteria for evaluating an analysis
Estimation of sensitivity and specificity
9 RECEIVER OPERATING CHARACTERISTIC CURVES AND CUTPOINTS FOR SCREENING TESTS
ROC curves
Comparing tests
10 PREDICTION USING THE MARGINS COMMAND
What is better than reporting coefficients and odds ratios?
Data preparation
Estimating the ORs
The margins command

Estimating risk for categorical predictors
Estimating the risk for quantitative predictors
Estimating for a combination of categorical and quantitative variables
11 GRAPHIC PRESENTATION USING THE MARGINSPLOT COMMAND
When and why
Graphs of categorical predictors that include three or more categories
Graphs with one quantitative predictor
Graphs with one quantitative and one categorical predictor
Graphs of a pair of categorical predictors
Graphs of a pair of categorical predictors
12 CURVE FITTING WITH QUADRATIC MODELS
A hypothetical example of a quadratic model using OLS regression
Estimating the curve (uncentered predictor)
Centering, collinearity, and nonessential collinearity
Estimating the curve (centered x)
Compare centered and uncentered models
Use of a quadratic with logistic regression
13 INTERACTION
Introduction
Interaction of a categorical and a quantitative variable using logistic regression
Estimating and interpreting probabilities (uncentered)
Interaction of categorical variables
Interaction of quantitative variables
14 RUNNING NESTREG AND POSTESTIMATION COMMANDS
Nested logistic regression
Selected postestimation commands
15 SPECIAL TOPICS

Collinearity and multicollinearity

Evaluating multicollinearity

Sample size
Small-sample bias
Relative risk

 

A Appendix
References
Author: Alan C. Acock
ISBN-13: 978-1-59718-415-1
©Copyright: 2026
Versione e-Book disponibile

Alan Acock’s book, A Practical Guide to Logistic Regression Using Stata, is written for students and researchers who are new to logistic regression and who want to focus on applications rather than theory. This guide teaches when and why logistic regression is appropriate, how to easily fit these models by using Stata, and how to interpret and present the results.