Announcement

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

  • Conditional marginal effect

    Dear members,

    I am trying to find marginal effects from a system of equations that I estimated using an user written command -cmp- (Roodman, 2009). I have a three stage problem: first stage is a participate/no participate decision which uses a probit model. Second stage is intensity of participation which could be 0, 1, 2 or 3; which uses an ordered probit. And the last stage is magnitude of participation ($ amount) which is a log-linear regression (this stage has four equations, one for each intensity level). After I estimate the system I want to find the marginal effect of the explanatory variables in the third stage conditional on the intensity from the second stage. Below is the code I used to estimate the system:

    Code:
    cmp ( replied =  no_target max_20 max_40 max_60 line_4 age40_65 above65 female below100000 _149999 _199999 maritalstatus data_2015 env_donor prev_mail) ///
        (multiple_add = max_40 max_60 max_100 line_4 age40_65 above65 female below100000 _149999 _199999 maritalstatus data_2015 env_donor prev_mail) ///
        ( lny3 =  no_target max_20 max_40 max_60 age40_65 above65 below100000 _149999 _199999 maritalstatus data_2015 env_donor line_4) ///
        ( lny4 =  max_20 max_40 max_60 age40_65 above65 below100000 _149999 _199999 maritalstatus data_2015 env_donor prev_mail) ///
        ( lny5 =  max_20 max_40 max_60 age40_65 above65 below100000 _149999 _199999 maritalstatus data_2015 env_donor prev_mail) ///
        ( lny6 =  max_20 max_40 max_60 age40_65 above65 below100000 _149999 _199999 maritalstatus data_2015 env_donor prev_mail), ///
        ind($cmp_probit $cmp_oprobit $cmp_cont $cmp_cont $cmp_cont $cmp_cont) nonrtolerance vce(robust) difficult
    To get the marginal effect, say for equation 3, I use the following code:
    Code:
    margins, dydx(*) predict(pr(0 .) eq(#3) cond(. _b[/cut_2_1], eq(#2)))
    To get the marginal effect for equation 4, I use the following:
    Code:
    margins, dydx(*) predict(pr(0 .) eq(#4) cond( _b[/cut_2_1] _b[/cut_2_2], eq(#2)))
    However, the codes are not running, and I am getting the following error: estimates repost: matrix has missing values. Also, I should mention here that all my explanatory variables are binary. So I think what I will get from this is average partial effects (if this code works).

    Could anyone please tell me, if this is a problem coming from the dataset, or is there something wrong with the code itself? I would really appreciate any suggestion on this.

    Thanks,
    Anwesha
Working...
X