Announcement

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

  • Cmp predict feature: conditional probabilities and expectations

    Hello,

    We are running a model with a continuous variable Y and two binary endonegous X variables X1 and X2 which we are instrumenting with Z1 and Z2. X1 and X2 are also dummy variables. We are using the following code for our analysis:

    cmp (Y= X1 X2 `Other Xvars') (X1 = Z1 Z2 `Other Xvars') (X2 = Z1 Z2 `Other Xvars'), indicators($cmp_cont $cmp_probit $cmp_probit)

    We want to predict the expected outcome Y (it is a continuous variable) when X1=0 and when X1=1 (X1 is a dummy). Eg. Y is a continuous index for material deprivation and X1 is a dummy that takes value 0 if drop-out from high school, 0 otherwise. We want to calculate the expected value of material deprivaton for those who drop-out and the corresponding one for those who do not.

    We have used the "condition" option after predict, but we obtain an error

    predict out0, e eq(Y) cond(pr, eq(X1))

    In "pr" the default values are (0,.)

    The error is "pr ambigous abbreviation"

    We have tried using (0,.) but the error is the same.

    We would highly appreciate if someone could guide us on how we can get conditional in our context, following the CMP command. Thanks a lot in advance!

    Ana I. Moro


  • #2
    Here's the description of the option in the help file:
    cmp's most unusual predict option is condition(). It allows computed probabilities and expectations for one equation's
    outcome to be conditioned on the bounding of another equation's outcome (or latent variable). E.g., one can use the option
    to predict the probability of a student's math score being between 5 and 10 if her reading score is between 4 and 8 (with
    something like pr(5 10) eq(math) cond(4 8, eq(reading))), or her expected math score conditioned the same way (e eq(math)
    cond(4 8, eq(reading))), or even her expected math score when both variables are so bounded (e(5 10) eq(math) cond(4 8,
    eq(reading))). Probability estimates for (ordered) probit equations can be conditioned too. To condition on a censored
    variable being within a certain range, refer to the associated cut points for its hypothesized latent variable, whether it
    is fixed (in probit, tobit, and interval regressions) or estimated (ordered probit). The Heckman selection model examples
    below illustrate.
    The command in the post doesn't seem to match the syntax of the examples in that paragraph. Don't you want something like predict out0, e eq(Y) cond(0 ., eq(X1))?

    Comment


    • #3
      Thanks a lot! very useful!

      Comment

      Working...
      X