Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Terminology: adjusted means, adjusted predictions, predictive margins?

    Copy-pasting an example from another thread:

    Code:
    sysuse nlsw88, clear
    reg never_married i.race##i.collgrad i.age
    margins race#collgrad, dydx()
    margins race#collgrad, atmeans
    In this application, margins, dydx() and margins, atmeans yield identical results. The dydx() results are labelled "Predictive margins", while the atmeans results are labelled "Adjusted predictions".
    I've been wondering whether the results can also be labelled/interpreted as "Adjusted means", as they seem to be just that to me.

  • #2
    The -dydx()- option is intended for computing marginal effects, not predictions. The only reason it didn't in your case is because you didn't specify any variables in the -dydx()- option to calculate marginal effects of. So it just gave you predictive margins. Actually, I would probably regard this as a bug in -margins-: specifying -dydx()- with no variables to take marginal effects of probably shouldn't be allowed. Technically, it is allowed, because -dydx()- takes a varlist argument, and a varlist can be empty. But then responding with marginal effects isn't, to me, a sensible way to handle that situation.

    Be that as it may, -margins- and -margins, atmeans- will produce the same results following the regression you show because the regression itself is a linear regression and there are, other than the race#collgrad interaction term, no non-linear terms among the regression predictors. But in the more general situation, say a logistic regression, or even a linear regression with a quadratic term, -margins- and -margins, atmeans- produce different results. Try running these to see:
    Code:
    sysuse auto, clear
    
    logistic foreign mpg weight i.rep78
    margins rep78
    margins rep78, atmeans
    
    regress price c.mpg##c.mpg i.rep78
    margins rep78
    margins rep78, atmeans

    Comment

    Working...
    X