Dear Statalist
I have gone through Tobit model in very a detailed way but reached a dead-end in trying to calculate the marginal effect for an IV Tobit model manually (NOT margins command) and I need your kind assistance please. As far as I know, if I want to calculate marginal effect manually (whether using nlcom or predictnl or whatsoever) for a tobit model with no endogenous variable I could simply do the following:
tobit Y X1 X2
predict xbeta, xb
egen avxbeta=mean(xbeta)
gen avxbsig=avxbeta/_b[/sigma]
gen lambda=normalden(avxbsig)/normal(avxbsig)
gen partial=_b[X1]*(1-lambda*(avxbsig+lambda))
sum partial
which satisfies:
margins, dydx(X1) predict(e(0,.)) atmeans
My question is: how can I do it if X1 is endogenous instrumented by Z1 as follows.
reg X1 Z1 X2
predict res, residual
tobit Y X1 X2 res
OR Simply put, for the code:
ivtobit Y (X1 = Z1) X2
how can I obtain [margins, dydx(X1) predict(e(0,.)) atmeans] mannually using nlcom or predictnl or any other way.
I know the ME calculation codes I posted above are not using nlcom or predictnl, but again please feel to provide codes using them.
Thanks in advance
Kind Regards
Thaer
Related Posts with Marginal effect manually for IV-Tobit
explained variance cox regression str2ph str2d with factor variablesHi there, I am running some cox regression analyses and want to estimate the explained variance wit…
Estimating discretionary accruals using modified jones model by company and year (r111 error)Hi there, I am trying to estimate the discretionary accruals of the modified Jones model in Stata. …
foreach loop variablesHey folks, im pretty new to stata and trying to merge different variables into 1 variable for ~20 d…
Hint to start programmingHello I am trying to write simple programs and can't seem to get started with what I am trying to d…
Questions about lud() and lusolve()Hi there! I have several questions about lud()and lusolve() functions. Reading MATA manual relativ…
Subscribe to:
Post Comments (Atom)
0 Response to Marginal effect manually for IV-Tobit
Post a Comment