Announcement

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

  • predict probability after cmp for triprobit

    Hi everyone,

    I am using cmp to estimate a trivariate probit model to account for selection bias (selectvar) and endogeneity of X1, simply as follows:

    Code:
     cmp (Y1=X1) (X1=X2) (selectvar=Z), ind($cmp_probit $cmp_probit selectvar*cmp_probit)
    I want to predict the joint probability Pr(X1=0,Y1=1), but do not know how to do that.

    Could I get that by using the Bayes theorem, by getting:

    unconditional probability Pr(X1=0)
    Code:
     predict x0, pr eq(X1)
    conditional probablity Pr(X1=0|Y1=1)
    Code:
     predict cd1, pr(. 0) eq(X1) cond(0 ., eq(Y1))
    and then
    Code:
     ge x0y1=x0*cd1
    Would anyone know if this is a correct way to do it? Or is there a more straightforward way to calculate that joint probability?

    Thanks very much.

  • #2
    I would do:
    Code:
    predict xb1, eq(#1)
    predict xb2, eq(#2)
    gen pr = binormal(-xb1, xb2, -tanh([/atanhrho_12]))

    Comment


    • #3
      Hi!
      I have a similar question. I'm estimating a trivariate probit considering one equation for poverty condition (poor), employment status (worker) and household composition(hh1). I need to estimate Pr(poor=1 | worker=1). Could you confirm if this code is correct?

      Code:
       cmp (poor = i.L_poor i.hh1 i.L_hh1 i.worker i.L_worker i.female i.clage i.educ i.health_lim i.year) (worker = i.L_worker i.L_poor i.L_hh1 i.female i.clage i.educ i.health_lim i.year) (hh1 = i.L_worker i.L_poor i.L_hh1  i.female i.clage i.educ i.health_lim i.year), ind(4 4 4) nonrtolerance difficult
      predict pr_it, pr(0 .) eq(poor) cond(1 1, eq(worker))
      .

      I'm not clear what "0 ." or ". 0" in pr() means exactly in the syntax.
      Thank you!

      Comment


      • #4
        The probit model posits that there is an unobserved ("latent") variable that depends linearly on the regressors. Here we could call 2 of the latent variables poor* and worker*. The observed variable poor is 1 or 0 depending on whether poor* >= 0 or not. The pr() and cond() clauses both refer to latent variables. And in them "." means + or - infinity. (This is standard in Stata, not just a cmp thing.) So you would probably want to change the predict command to:

        Code:
         
         predict pr_it, pr(0 .) eq(poor) cond(0 ., eq(worker))
        Separately, there is a conceptual complication. The model allows the error terms in the poor and worker equations to be correlated. So there are actually two ways that variation in worker can be associated with variation in poor. worker can affect poor through the coefficient on 1.worker. Or there could be a shared shock to the two equations' error terms. The computation you're doing here assumes away the latter. It asks, what's the probability of poor=1 if we fix worker=1 and allow only exogenous variation in the error term of the poor equation, which in no way affects employment status. My point is not that there is a right and wrong way to do things, only that it's important to understand what the results mean.

        Comment


        • #5
          Originally posted by David Roodman View Post
          I would do:
          Code:
          predict xb1, eq(#1)
          predict xb2, eq(#2)
          gen pr = binormal(-xb1, xb2, -tanh([/atanhrho_12]))
          Hello! I am a newbie here. I have a similar question. How can I extend this to estimate the joint probabilities for a multivariate probit model with three outcomes or more? Thank you so much.
          Last edited by Adelakun Odunyemi; 29 Jan 2025, 20:33.

          Comment

          Working...
          X