Announcement

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

  • Why "margins" does not work for "cmp" ?

    Dear Statalists,

    I am running an ordered probit model with 2 endogenous variables and two instrumental variables using "cmp" command created by David Roodman.

    The command is the following:

    Code:
    qui cmp(y1=y2 y3 x1 x2 x3 i.class) (y2=z1 z2 x1 x2 x3 i.class) (y3=z1 z2 x1 x2 x3 i.class) ind($cmp_oprobit $cmp_cont $cmp_cont)
    in which, y1 is a categorical variable with 5 categories, y2 and y3 are endogenous continuous variables, z1 and z2 are dummy variables, i.class is a set of dummies (around 400 dummies).

    Then I got decent outcomes for both stages. The coefficients of y2 and y3 were 0.806 (sd 0.252) and 0.781 (sd 0.272), respectively.

    However, when I tried to find the marginal effects of y2, y3 on y1, using the following command:

    Code:
    margins, dydx(y2 y3) predict(equation(y1)) force noestimcheck
    the reported marginal effects of y2, y3 were exactly the same as the coefficients of y2 and y3, which were 0.806 (sd 0.252) and 0.781 (sd 0.272). It seems the "margins" command does not work for "cmp" here.

    Could someone tell me if there is anything wrong with my command? Or it is just because "margins" does not work for "cmp" with three equations?
    Last edited by Yutian Yang; 08 Jul 2019, 15:21.

  • #2
    See the help for cmp, in particular, the section "On predict and margins after cmp." cmp defaults to xb for the predict and margins commands. You presumably want pr. The help shows how to do that and gives examples.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment

    Working...
    X