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
Code:
margins, dydx(*) predict(pr(0 .) eq(#3) cond(. _b[/cut_2_1], eq(#2)))
Code:
margins, dydx(*) predict(pr(0 .) eq(#4) cond( _b[/cut_2_1] _b[/cut_2_2], eq(#2)))
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
0 Response to Conditional marginal effect
Post a Comment