Marginal effects and margins¶
In the app: Help → Help contents, Marginal effects and margins.
In a logit, probit, count, Tobit, ordered or multinomial model the coefficients are effects on an index, not on the probability or the expected outcome; marginal effects translate them (Estimate > Margins, or marginal_effects(fit)). The average marginal effect averages each observation's effect over the sample; the effect at the means evaluates it once, at the average person, who may not exist (the mean of a 0/1 variable is a share). A 0/1 variable's effect is the change from 0 to 1. Standard errors are by the delta method.
At values (Stata's at()) gives effects at chosen values of some variables, e.g. age at 30, 40 and 50 with the other variables at their observed values (or their means): one row per combination, a profile. Predictive margins are the predicted outcome itself at each profile, such as the probability of working with 0, 1 or 2 young children averaged over everyone else's characteristics. Contrast gives each profile less the first, with its standard error: the effect of x at z = 1 less at z = 0 says whether the effect differs between the groups. Changes gives discrete changes in place of derivatives: from one value to another, by an amount, or by one standard deviation.
When a variable enters several terms (x and x^2, xz, log(x)), its effect goes through all of them: the variable is changed and every term rebuilt from it, as Stata does with factor variables. The effect of x in y ~ x + x^2 is b1 + 2 b2 x (for a linear equation), not b1. Each term on its own (terms=True) gives the old, term-by-term numbers, which mean little for x^2. A variable that is not a term on its own needs the estimation data. In a nonlinear model even y ~ x + z has an interaction in the probabilities: the effect of x depends on z, and the coefficient on xz is not the interaction effect on the probability (Ai and Norton, 2003); compare the effects at chosen values instead. For a linear equation without such terms, the effects are the coefficients.
See also¶
References¶
- Williams, R. (2012). Using the margins command to estimate and interpret adjusted predictions and marginal effects. The Stata Journal 12(2), 308-331. (search)
- Ai, C. and Norton, E. C. (2003). Interaction terms in logit and probit models. Economics Letters 80(1), 123-129. (search)
- Cameron, A. C. and Trivedi, P. K. (2005). Microeconometrics: Methods and Applications, section 5.2.4 (marginal effects). Cambridge University Press. (search)