Hello,
I'm currently estimating a Hurdle model (with only one hurdle) and I'm having issues computing joint marginal effects for both equations.
Here is the code i'm using to compute joint and independant marginal effect without IV:
(I used smoke dataset as an example for reproductibility)
Then I consider for this example "lcigpric" is endogenous and instrumented with "age" and "agesq"
My issue is to find a way to compute joint marginal effect when one variable is endogenous.
I've seen two post on the stata blog dealing with the computation of marginal effects for multiple equation models, however the first method require the use of maximum likelihood estimates (which is not the case with the IV estimates I'm using), or to use GSEM but it does not allow ivprobit or ivpoisson either and doesn't allow for simple hurdle (because the second equation does not have the same number of observations as the first one).
Anyone know a method to overcome this issue please?
Best regards,
YM.
I'm currently estimating a Hurdle model (with only one hurdle) and I'm having issues computing joint marginal effects for both equations.
Here is the code i'm using to compute joint and independant marginal effect without IV:
(I used smoke dataset as an example for reproductibility)
Code:
ssc install twopm use https://www.stata.com/data/jwooldridge/eacsap/smoke.dta * Probit and its marginal effects probit cigs educ restaurn lincome lcigpric, robust margins, dydx(*) * Poisson and its marginal effects glm cigs educ restaurn lincome lcigpric if cigs>0, family(poisson) link(log) robust margins, dydx(*) * Joint marginal effects twopm cigs educ restaurn lincome lcigpric , firstpart(probit) secondpart(glm, family(poisson) link(log)) vce(robust) margins, dydx(*)
Then I consider for this example "lcigpric" is endogenous and instrumented with "age" and "agesq"
Code:
* IV Probit and its marginal effects ivprobit cigs educ restaurn lincome (lcigpric=age agesq), vce(robust) margins, dydx(*) * IV Poisson and its marginal effects ivpoisson gmm cigs educ restaurn lincome (lcigpric=age agesq) if cigs>0, vce(robust) margins, dydx(*)
I've seen two post on the stata blog dealing with the computation of marginal effects for multiple equation models, however the first method require the use of maximum likelihood estimates (which is not the case with the IV estimates I'm using), or to use GSEM but it does not allow ivprobit or ivpoisson either and doesn't allow for simple hurdle (because the second equation does not have the same number of observations as the first one).
Anyone know a method to overcome this issue please?
Best regards,
YM.
Comment