Announcement

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

  • how to calculate marginal effects on conditional probability after Roodman's cmp command

    Dear all,

    I need help regarding margins condition command after cmp. Cmp is user written Roodman (2011) command (Roodman, D. 2011. Estimating fully observed recursive mixed-process models with cmp. Stata Journal 11(2): 159-206.).

    I have panel data and I want to estimate bivariate random effects probit model (similarly as biprobit in univariate case). Dependent variables are binary, taking values 0 and 1.

    In a help file there are examples how to use condition option in margin command after Heckman model, e.g. margins, dydx(*) predict(e eq(wage) condition(0 ., eq(selectvar))), where margins are computed conditional on observing wage. I am not sure how to set condition option properly. If I write condition(1 ., eq(y2)) those this means conditional that y2 is equal 1, and condition (. 0, eq(y2)) conditional that y2 is equal 0, or is it the opposite?

    Please have a look at the code, and comment that I posted in a code. Thanks in advance.

    Best regards,
    Aleksandra

    Code:
    cmp (y1=$xlist1 || id:) (y2=$xlist1 || id:), ind($cmp_probit $cmp_probit) 
    estimate store cmp
    estimate restore cmp
    margins, dydx(*) predict(pr eq(y1) condition(1 ., eq(y2))) post // this line is probability that y1=1 (positive outcome) given that y2=1 (positive outcome of y2)
    estimate store cond_y2_1 
    estimate restore cmp
    margins, dydx(*) predict(pr eq(y1) condition(. 0, eq(y2))) post // this line is probability that y1=1 (positive outcome) given that y2=0 (negative outcome of y2)
    estimate store cond_y2_0

  • #2
    The probit model posits that there is an observed linear predictor that depends continuously on the regressors, just as in the linear model. If it is >0 then the observed outcome is 1.

    "condition(1 ., eq(y2))" means that the unobserved linear predictor for the y2 equation is between 1 and +infinity. "condition (. 0, eq(y2))" means that it is between -infinity and 0.

    Comment


    • #3
      Dear David,

      Thank you for your immediate answer. If I understood correctly puting "condition(. 0, eq(y2))" means that actually y2=0 (-inf, 0), but since y2 is binary it will take value 0, and puting "condition(0 ., eq(y2))" means y2=1 (0, +inf), actually >0 means that y2 will take 1.

      Could you please just confirm am I correct?

      Thanks once again.
      P.S. I am often using your command, but in some particular situations I am not sure how to set code and/or interpret results.

      Best regards,
      Aleksandra

      Comment


      • #4
        Yes, that is exactly right.

        Comment

        Working...
        X