Interpreting and Visualizing Regression Models Using Stata

Michael Mitchell’s Interpreting and Visualizing Regression Models Using Stata is a clear treatment of how to carefully present results from model-fitting in a wide variety of settings. It is a boon to anyone who has to present the tangible meaning of a complex model in a clear fashion, regardless of the audience. As an example, many experienced researchers start to squirm when asked to give a simple explanation of the applied meaning of interactions in nonlinear models such as logistic regression. The tools in Mitchell’s book make this task much more enjoyable and comprehensible.

 

Mitchell starts with simple linear regression (which is simple in all ways), and then adds polynomials and discontinuities. This is followed by 2-way and 3-way interaction until interpretation of coefficients through words is difficult. By careful use of Stata’s marginsplotcommand, Mitchell shows how well graphs can be used to show effects. He also includes careful verbal interpretation of coefficients to make communications complete. He then extends the methods from linear regression to various types of nonlinear regression, such as multilevel or survival models.

 

A significant difference between this book and most others on regression models is that Mitchell spends quite some time on fitting and visualizing discontinuous models—models where the outcome can change value suddenly at thresholds. Such models are natural in settings such as education and policy evaluation, where graduation or policy changes can make sudden changes in income or revenue.

 

This book is a worthwhile addition to the library of anyone involved in statistical consulting, teaching, or collaborative applied statistical environments.

List of Tables
List of Figures
Preface
Acknowledgements

 

1. INTRODUCTION

Overview of the book
Getting the most out of this book
Downloading the example datasets and programs
The GSS dataset

Income
Age
Education
Gender

The pain datasets
The optimism datasets
The school datasets
The sleep datasets

 

I CONTINUOS PREDICTORS

 

2. CONTINUOS PREDICTORS: LINEAR

Chapter overview
Simple linear regression

Computing predicted means using the margins command
Graphing predicted means using the marginsplot command

Multiple regression

Computing adjusted means using the margins command
Some technical details about adjusted means
Graphing adjusted means using the marginsplot command

Checking for nonlinearity graphically

Using scatterplots to check for nonlinearity
Checking for nonlinearity using residuals
Checking for nonlinearity using locally weighted smoother
Graphing outcome mean at each level of predictor
Summary

Checking for nonlinearity analytically

Adding power terms
Using factor variables

Summary

 

3. CONTINUOS PREDICTORS: POLYNOMIALS

Chapter overview
Quadratic (squared) terms

Overview
Examples

Cubic (third power) terms

Overview
Examples

Fractional polynomial regression

Overview
Example using fractional polynomial regression

Main effects with polynomial terms
Summary

 

4. CONTINUOS PREDICTORS: PIECEWISE MODELS

Chapter overview
Introduction to piecewise regression models
Piecewise with one known knot

Overview
Examples using the GSS

Piecewise with two known knots

Overview
Examples using the GSS

Piecewise with one knot and one jump

Overview
Examples using the GSS

Piecewise with two knots and two jumps

Overview
Examples using the GSS

Piecewise with an unknown knot
Piecewise model with multiple unknown knots
Piecewise models and the marginsplot command
Automating graphs of piecewise models
Summary

 

5. CONTINUOUS BY CONTINUOUS INTERACTIONS

Chapter overview
Linear by linear interactions

Overview
Example using GSS data
Interpreting the interaction in terms of age
Interpreting the interaction in terms of education
Interpreting the interaction in terms of age slope
Interpreting the interaction in terms of the educ slope

Linear by quadratic interactions

Overview
Example using GSS data

Summary

 

6. CONTINUOUS BY CONTINUOUS BY CONTINUOUS INTERACTIONS

Chapter overview
Overview
Examples using the GSS data

A model without a three-way interaction
A three-way interaction model

Summary

 

II CATEGORICAL PREDICTORS

 

7. CATEGORICAL PREDICTORS

Chapter overview
Comparing two groups using a t test
More groups and more predictors
Overview of contrast operators
Compare each group against a reference group

Selecting a specific contrast
Selecting a different reference group
Selecting a contrast and reference group

Compare each group against the grand mean

Selecting a specific contrast

Compare adjacent means

Reverse adjacent contrasts
Selecting a specific contrast

Comparing the mean of subsequent or previous levels

Comparing the mean of previous levels
Selecting a specific contrast

Polynomial contrasts
Custom contrasts
Weighted contrasts
Pairwise comparisons
Interpreting confidence intervals
Testing categorical variables using regression
Summary

 

8. CATEGORICAL BY CATEGORICAL INTERACTIONS

Chapter overview
Two by two models: Example 1

Simple effects
Estimating the size of the interaction
More about interaction

Summary

Two by three models

Example 2
Example 3
Summary

Three by three models: Example 4

Simple effects
Simple contrasts
Partial interaction
Interaction contrasts
Summary

Unbalanced designs
Main effects with interactions: anova versus regress
Interpreting confidence intervals
Summary

 

9. CATEGORICAL BY CATEGORICAL BY CATEGORICAL INTERACTIONS

Chapter overview
Two by two by two models

Simple interactions by season
Simple interactions by depression status
Simple effects

Two by two by three models

Simple interactions by depression status
Simple partial interaction by depression status
Simple contrasts
Partial interactions

Three by three by three models and beyond

Partial interactions and interaction contrasts
Simple interactions
Simple effects and simple comparisons

Summary

 

III CONTINUOS AND CATEGORICAL PREDICTORS

 

10. LINEAR BY CATEGORICAL INTERACTIONS

Chapter overview
Linear and two-level categorical: No interaction

Overview
Examples using the GSS

Linear by two-level categorical interactions

Overview
Examples using the GSS

Linear by three-level categorical interactions10.4.1 Overview

Overview

Examples using the GSS

Summary

 

11. POLYNOMIAL BY CATEGORICAL INTERACTIONS

Chapter overview
Quadratic by categorical interactions

Overview
Quadratic by two-level categorical
Quadratic by three-level categorical

Cubic by categorical interactions
Summary

 

12. PIECEWISE BY CATEGORICAL INTERACTIONS

Chapter overview
One knot and one jump

Comparing slopes across gender
Comparing slopes across education
Difference in differences of slopes
Comparing changes in intercepts
Computing and comparing adjusted means
Graphing adjusted means

Two knots and two jumps

Comparing slopes across gender
Comparing slopes across education
Difference in differences of slopes
Comparing changes in intercepts by gender
Comparing changes in intercepts by education
Computing and comparing adjusted means
Graphing adjusted means

Comparing coding schemes

Coding scheme #1
Coding scheme #2
Coding scheme #3
Coding scheme #4
Choosing coding schemes

Summary

 

13. CONTINUOUS BY CONTINUOUS BY CATEGORICAL INTERACTIONS

Chapter overview
Linear by linear by categorical interactions

Fitting separate models for males and females
Fitting a combined model for males and females
Interpreting the interaction focusing in the age slope
Interpreting the interaction focusing on the educ slope
Estimating and comparing adjusted means by gender

Linear by quadratic by categorical interactions

Fitting separate models for males and females
Fitting a common model for males and females
Interpreting the interaction
Estimating and comparing adjusted means by gender

Summary

 

14. CONTINUOUS BY CATEGORICAL BY CATEGORICAL INTERACTIONS

Chapter overview
Simple effects of gender on the age slope
Simple effects of education on the age slope
Simple contrasts on education for the age slope
Partial interaction on education for the age slope
Summary

 

IV BEYOND ORDINARY LINEAR REGRESSION

 

15. MULTILEVEL MODELS

Chapter overview
Example 1: Continuous by continuous interaction
Example 2: Continuous by categorical interaction
Example 3: Categorical by continuous interaction
Example 4: Categorical by categorical interaction
Summary

 

16. TIME AS A CONTINUOUS PREDICTOR

Chapter overview
Example 1: Linear effect of time
Example 2: Linear effect of time by a categorical predictor
Example 3: Piecewise modeling of time
Example 4: Piecewise effects of time by a categorical predictor

Baseline slopes
Change in slopes: Treatment versus baseline
Jump at treatment
Comparisons among groups

Summary

 

17. TIME AS A CATEGORICAL PREDICTOR

Chapter overview
Example 1: Time treated as a categorical variable
Example 2: Time (categorical) by two groups
Example 3: Time (categorical) by three groups
Comparing models with different residual covariance structures
Summary

 

18. NONLINEAR MODELS

Chapter overview
Binary logistic regression

A logistic model with one categorical predictor
A logistic model with one continuous predictor
A logistic model with covariates

Multinomial logistic regression
Ordinal logistic regression
Poisson regression
More applications of nonlinear models

Categorical by categorical interaction
Categorical by continuous interaction
Piecewise modeling

Summary

 

19. COMPLEX SURVEY DATA

 

V APPENSICES

 

A. THE MARGINS COMMAND

The predict() and expression() options
The at() option
Margins with factor variables
Margins with factor variables and the at() option
The dydx() and related options

 

B. THE MARGINSPLOT COMMAND

 

C. THE CONTRAST COMMAND

 

D. THE PWCOMPARE COMMAND

Author: Michael N. Mitchell
ISBN-13: 978-1-59718-107-5
©Copyright: 2012
Versione e-Book disponibile

Michael Mitchell’s Interpreting and Visualizing Regression Models Using Stata is a clear treatment of how to carefully present results from model-fitting in a wide variety of settings. It is a boon to anyone who has to present the tangible meaning of a complex model in a clear fashion, regardless of the audience.