Announcement

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

  • Heterogeneity using interaction, with ivprobit

    Dear all,
    I was running the following model, where I wanted to test for any heterogeneity by gender:

    Code:
    ivprobit Y (c.X#i.child_male = c.Z#i.child_male),  cluster(prov_birth_child_code) first
    where Y is the binary DV, X is an endogenous variable and Z is an IV.
    When trying to run this I got the following error:
    Code:
    could not find initial values
    However, when I run the following models, I have no errors:
    Code:
    ivprobit Y (X= Z) if child_male ==1,  cluster(prov_birth_child_code) first
    ivprobit Y (X= Z) if child_male ==0,  cluster(prov_birth_child_code) first
    Am I doing something wrong with the first model, using the interactions?
    I appreciate your help.

  • #2
    So after some thought, I solved the problem with cmp as follows:

    Code:
    cmp ( Y = c.X#ib1.child_male   , iia) (X= c.Z#ib1.child_male  , iia), vce(cluster prov_birth_child_code) ind($cmp_probit $cmp_cont) nolr nonrtolerance
    Then, for marginal effects, I have the same problem as above, using
    Code:
    margins child_male, dydx(X) noestimcheck predict(equation(Y) pr)
    or using
    Code:
    margins if child_male ==1, dydx(X) noestimcheck predict(equation(Y) pr)
    margins if child_male ==0, dydx(X) noestimcheck predict(equation(Y) pr)
    These two codes for marginal effects give different results.
    Even though it is following a cmp where the whole sample size is used, in the second code of marginal effects subsamples are used.

    Do you please have any thoughts on this?


    I am also wondering if this code:
    Code:
    margins child_male, dydx(X) noestimcheck predict(equation(Y) pr)
    is giving me the marginal effects for X for each value of the male variable, or the marginal effect for the male variable for a one unit change in X, would these two be different?

    Thank you.

    Comment

    Working...
    X