This book is designed as a gentle introduction to the fascinating field of choice modeling and its practical implementation using the R language. Discrete choice analysis is a family of methods useful to study individual decision-making. With strong theoretical foundations in consumer behavior, discrete choice models are used in the analysis of health policy, transportation systems, marketing, economics, public policy, political science, urban planning, and criminology, to mention just a few fields of application. The book does not assume prior knowledge of discrete choice analysis or R, but instead strives to introduce both in an intuitive way, starting from simple concepts and progressing to more sophisticated ideas. Loaded with a wealth of examples and code, the book covers the fundamentals of data and analysis in a progressive way. Readers begin with simple data operations and the underlying theory of choice analysis and conclude by working with sophisticated models including latent class logit models, mixed logit models, and ordinal logit models with taste heterogeneity. Data visualization is emphasized to explore both the input data as well as the results of models. This book should be of interest to graduate students, faculty, and researchers conducting empirical work using individual level choice data who are approaching the field of discrete choice analysis for the first time. In addition, it should interest more advanced modelers wishing to learn about the potential of R for discrete choice analysis. By embedding the treatment of choice modeling within the R ecosystem, readers benefit from learning about the larger R family of packages for data exploration, analysis, and visualization. Preface Choices, Choices, Choices Price Mechanisms, or, Is Money the Root of All Evil Beyond Prices Plan Audience Requisites Getting Started Session Information Contents 1 Data, Models, and Software 1.1 What Are Models? 1.2 How to Use This Chapter 1.3 Learning Objectives 1.4 Suggested Readings 1.5 Ways of Measuring Stuff 1.5.1 Categorical Measurements 1.5.2 Quantitative Measurements 1.6 Importing Data 1.7 Data Classes in R 1.8 More on Indexing and Data Manipulation 1.9 Visualization 1.10 Exercises References 2 Exploratory Data Analysis 2.1 Why Exploratory Data Analysis? 2.2 How to Use This Chapter 2.3 Learning Objectives 2.4 Suggested Readings 2.5 Preliminaries 2.6 Univariate Analysis of Categorical Variables 2.7 Bivariate Analysis 2.7.1 Exploring the Relationship Between a Categorical and a Quantitative Variables 2.7.2 Exploring the Relationship Between Two Categorical Variables 2.8 Multivariate Analysis 2.8.1 Faceting 2.8.2 More Examples of Faceting 2.9 Final Remarks 2.10 Exercises References 3 Fundamental Concepts 3.1 Why Modeling Choices? 3.2 How to Use This Chapter 3.3 Learning Objectives 3.4 Suggested Readings 3.5 Preliminaries 3.6 Choice Mechanisms: Utility Maximization 3.6.1 What Is Utility? 3.7 What About Those Random Terms? 3.8 Probability Distribution Functions (PDFs) and Cumulative ... 3.9 A Simple Random Utility Discrete Choice Model 3.10 Other Choice Mechanisms 3.11 Exercises References 4 Logit 4.1 Modeling Choices 4.2 How to Use This Chapter 4.3 Learning Objectives 4.4 Suggested Readings 4.5 Preliminaries 4.6 Once Again Those Random Terms 4.7 The Logit Model 4.8 Now, About Those Parameters μ and σ... 4.9 Multinomial Logit 4.10 Properties of the Logit Model 4.11 Revisiting the Systematic Utilities 4.12 Exercises References 5 Practical Issues in the Specification and Estimation of Discrete Choice Models 5.1 Theory and Practice 5.2 How to Use This Chapter 5.3 Learning Objectives 5.4 Suggested Readings 5.5 Preliminaries 5.6 The Anatomy of Utility Functions 5.7 Example: Specifying the Utility Functions 5.8 Estimation 5.9 Example: A Logit Model of Mode Choice 5.10 Comparing Models: McFadden's ρ2 5.11 Comparing Models: The Likelihood Ratio Test 5.12 Exercises References 6 Behavioral Insights from Choice Models 6.1 Inferring and Forecasting Behavior 6.2 How to Use This Note 6.3 Learning Objectives 6.4 Suggested Readings 6.5 Preliminaries 6.6 The Meaning of the Coefficients 6.7 Marginal Effects 6.7.1 Direct Marginal Effects 6.7.2 Cross-Marginal Effects 6.8 Elasticity 6.8.1 Direct-Point Elasticity 6.8.2 Cross-Point Elasticity 6.9 Calculating elasticities based on an Mlogit Model 6.9.1 Computing the Marginal Effects 6.9.2 Computing the Elasticities 6.10 A Note About Attributes in Dummy Format 6.11 Willingness to Pay and Discount Rate 6.12 Simulating Market Changes 6.12.1 Incentives 6.12.2 Introduction of a New System 6.13 Simulating Individual-Level Outcomes 6.14 Exercises References 7 Non-proportional Substitution Patterns I: Generalized Extreme Value Models 7.1 The Limits of Perfection 7.2 How to Use This Note 7.3 Learning Objectives 7.4 Suggested Readings 7.5 Generalized Extreme Value Models: A Recipe for Deriving Discrete Choice Models 7.6 Nested Logit Model 7.7 Properties of the Nested Logit Model 7.8 Estimation of the Nested Logit Model 7.9 Substitution Patterns with the Nested Logit Model 7.10 Paired Combinatorial Logit 7.11 Elasticities of the Nested and Paired Combinatorial Logit Models 7.12 Exercises References 8 Non-proportional Substitution Patterns II: The Probit Model 8.1 More on Flexible Substitution Patterns 8.2 Preliminaries 8.3 How to Use This Note 8.4 Learning Objectives 8.5 Suggested Readings 8.6 Fundamental Concepts 8.7 Estimation of Probit Models 8.8 Example 8.9 What About the Substitution Patterns? 8.10 More About Simulation-Based Estimation 8.11 Final Remarks 8.12 Exercises References 9 Dealing with Heterogeneity I: The Latent Class Logit Model 9.1 Taste Variations in the Population 9.2 How to Use This Chapter 9.3 Learning Objectives 9.4 Suggested Readings 9.5 Preliminaries 9.6 An Appetite for Risk? 9.7 Latent Class Logit 9.8 Estimation 9.9 Properties of the Latent Class Logit Model 9.10 Empirical Example 9.10.1 Behavioral Insights 9.11 Adding Individual-Level attributes 9.12 Adding Variables to the Latent Class-Membership Model 9.13 Exercises References 10 Dealing with Heterogeneity II: The Mixed Logit Model 10.1 More on Taste Variation 10.2 How to Use This Note 10.3 Learning Objectives 10.4 Suggested Readings 10.5 Mixed Logit 10.6 Estimation 10.7 Example 10.8 Behavioral Insights from the Mixed Logit Model 10.8.1 Unconditional Distribution of a Random Parameter 10.8.2 Conditional Distribution of the Random Coefficients 10.9 Using Covariates to Capture Variations In Taste 10.10 Revisiting the Example 10.11 Final Remarks 10.12 Exercises References 11 Models for Ordinal Responses 11.1 Ordinal Responses 11.2 How to Use This Note 11.3 Learning Objectives 11.4 Suggested Readings 11.5 Preliminaries 11.6 Modeling Ordinal Variables 11.7 But What About Those Thresholds? 11.8 And What About the Scale Parameter? 11.9 Example 11.10 Proportional Odds Property of the Ordinal Logistic Model 11.11 Non-proportional Odds Models 11.11.1 Parameterizing the Thresholds 11.11.2 Parameterizing the Scale 11.12 Multivariate Ordinal Models 11.13 Exercise References Appendix Epilogue References This book is designed as a gentle introduction to the fascinating field of choice modeling and its practical implementation using the R language. Discrete choice analysis is a family of methods useful to study individual decision-making. With strong theoretical foundations in consumer behavior, discrete choice models are used in the analysis of health policy, transportation systems, marketing, economics, public policy, political science, urban planning, and criminology, to mention just a few fields of application. The book does not assume prior knowledge of discrete choice analysis or R, but instead strives to introduce both in an intuitive way, starting from simple concepts and progressing to more sophisticated ideas. Loaded with a wealth of examples and code, the book covers the fundamentals of data and analysis in a progressive way. Readers begin with simple data operations and the underlying theory of choice analysis and conclude by working with sophisticated models including latent class logit models, mixed logit models, and ordinal logit models with taste heterogeneity. Data visualization (with ggplot2) is emphasized to explore both the input data as well as the results of models.