10.1 Reintroducing Marginal Effects
Marginal effects are partial derivatives of the regression equation with respect to each variable in the model for each unit in the data.
Said in a different way, a marginal effect captures the association between a change in an explanatory variable and a change in a response. In fact, the marginal effect is the slope of this prediction function, measured at a specific value of the explanatory variable.
Big picture: Marginal effects use model predictions to aid us in our interpretation of a fitted model, while also providing a framework to visualize and test our results.
Linear Models
In linear models (without interactions, quadratic terms, etc.) the effect of a given change in an independent variable is the same regardless of (1) the value of that variable at the start of its change, and (2) the level of the other variables in the model.
Nonlinear Models
In nonlinear models the effect of a given change in an independent variable (1) depends on the values of other variables in the model, and (2) is no longer equal to the parameter itself.
Contrast Linear and Nonlinear Models
Consider a linear and nonlinear model for happiness as a function of personal spending and a dummy variable indicating whether someone is rich.
A Few Observations On the Image Above
For the linear model: - Whether one is rich or poor does no impact the relationship between happiness and personal spending. - Differences in happiness levels between rich and poor are not dependent on the amount of money one spends.
From the nonlinear model: - Whether one is rich or poor does impact the relationship between happiness and personal spending. - Differences in happiness levels between rich and poor are dependent on the amount of money one spends.
Continuous and Categorical Predictors
Continuous Variable: the statistical effect for continuous explanatory variables; the partial derivative of a variable in a regression model; the effect of a single slider
Categorical Variable: the statistical effect for categorical explanatory variables; the difference in means when a condition is on vs. when it is off; the effect of a single switch
Types of Marginal Effects
There are generally three types of marginal effects people consider:
- Average Marginal Effects (AME)
- Marginal Effects at the Means (MEM)
- Marginal Effects at Representative Values (MEM)
We won’t dive into the nuances of these differences here, but interested parties should take a look at the amazing Marginalia Website from Andrew Heiss.
The three features of marginal effects we will explore in class:
- Slopes
- Predictions
- Hypothesis Tests