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
1.1 Questions we can answer using logistic regression
1.2 Ways to report results
1.3 Using Stata
2 Getting ready
2.1 Opening the dataset
2.2 Exploring the data
2.3 Labeling values for categorical variables
2.4 Saving the edited dataset
3 Conventional ordinary least-squares regression versus logistic regression
3.1 What OLS regression can tell us
3.2 What logistic regression can tell us

3.2.1 Robust and cluster–robust estimation

An imperfect model
Clustered sample design
4 Interpreting an odds ratio
4.1 What is an odds ratio?
4.2 Interpreting ORs as a percentage difference for binary predictors
5 What is wrong with ordinary least-squares regression for a binary outcome?
5.1 Hypothetical data
5.2 How does logistic regression fit better than ordinary least-squares linear regression?
6 Fitting and interpreting logistic regression models
6.1 Interpreting coefficients and odds ratios
6.2 Fitting logistic regression models with multiple predictors
6.3 Interpreting ORs for quantitative predictors
6.4 Selecting the right base level for categorical predictors
7 How well does the model fit the data?
7.1 Pseudo-R² measures of fit
7.2 Information criteria
7.3 Identifying cases that the model fits poorly
8 Sensitivity and specificity
8.1 Criteria for evaluating an analysis
8.2 Estimation of sensitivity and specificity
9 Receiver operating characteristic curves and cutpoints for screening tests
9.1 ROC curves
9.2 Comparing tests
10 Predictions using the margins command
10.1 What is better than reporting coefficients and odds ratios?
10.2 Data preparation
10.3 Estimating the ORs
10.4 The margins command

10.4.1 Estimating risk for categorical predictors
10.4.2 Estimating the risk for quantitative predictors
10.4.3 Estimating for a combination of categorical and quantitative variables
11 Graphic presentation using the marginsplot command
11.1 When and why
11.2 Graphs of categorical predictors that include three or more categories
11.3 Graphs with one quantitative predictor
11.4 Graphs with one quantitative and one categorical predictor
11.5 Graphs of a pair of categorical predictors
11.6 Graphs of a pair of categorical predictors
12 Curve fitting with quadratic models
12.1 A hypothetical example of a quadratic model using OLS regression
12.2 Estimating the curve (uncentered predictor)
12.3 Centering, collinearity, and nonessential collinearity
12.4 Estimating the curve (centered x)
12.5 Compare centered and uncentered models
12.6 Use of a quadratic with logistic regression
13 Interaction
13.1 Introduction
13.2 Interaction of a categorical and a quantitative variable using logistic regression
13.3 Estimating and interpreting probabilities (uncentered)
13.4 Interaction of categorical variables
13.5 Interaction of quantitative variables
14 Running nestreg and postestimation commands
14.1 Nested logistic regression
14.2 Selected postestimation commands
15 Special topics

15.1 Collinearity and multicollinearity

15.1.1 Evaluating multicollinearity

15.2 Sample size
15.3 Small-sample bias
15.4 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.