Dear Statalist,
Greetings!
I was trying to estimate the drivers of farmers adoption decions. My dependant variable is truncated from below - thus applied double hurdle model. I have estimated the model and also calculated average partial effects of continnous explanatory variable for the probability as well as conditional and unconditional expectation. But for binary explanatory variables I could only manage to estimate the average partial effect of the unconditional expected value of the dependent variable as follows - for example.
predict x1g, eq(Tier1)
predict x2b, eq(Tier2)
predict sigma, eq(sigma)
gen xgd0 = x1g if RegionDummy4==0
replace xgd0 = x1g - [Tier1]_b[RegionDummy4] if RegionDummy4==1
gen xgd1 = x1g + [Tier1]_b[RegionDummy4] if RegionDummy4==0
replace xgd1 = x1g if RegionDummy4==1
gen xbd0 = x2b if RegionDummy4==0
replace xbd0 = x2b - [Tier2]_b[RegionDummy4] if RegionDummy4==1
gen xbd1 = x2b + [Tier2]_b[RegionDummy4] if RegionDummy4==0
replace xbd1 = x2b if RegionDummy4==1
gen IMRd0 = normalden(xbd0/sigma)/normal(xbd0/sigma)
gen IMRd1 = normalden(xbd1/sigma)/normal(xbd1/sigma)
gen ped1 = [normal(xgd1)]
gen ped2 = [normal(xgd1)*(xbd1 + sigma*IMRd1)]
gen pe2u_d1 = [normal(xgd1)*(xbd1 + sigma*IMRd1)] - [normal(xgd0)*(xbd0 + sigma*IMRd0)]
sum x1g
local x1gbar = r(mean)
sum x2b
local x2bbar = r(mean)
nlcom [Tier1]_b[ RegionDummy4 ]*normd(`x1gbar')*(`x2bbar'+[sigma]_b[_cons]* (normden(`x2bbar'/[sigma]_b[_cons])/normal(`x2bbar'/[sigma]_b[_cons])))+[Tier2]_b[ RegionDummy4 ]*normal(`x1gbar')*(1-(normden(`x2bbar'/[sigma]_b[_cons])/normal(`x2bbar'/[sigma]_b[_cons]))*(`x2bbar'/[sigma]_b[_cons]+(normden(`x2bbar'/[sigma]_b[_cons])/normal(`x2bbar'/[sigma]_b[_cons]))))
sum pe2u_d1
And, I was wondering if someone could tip me how to compute average partial effects of binary explanatory variables for the probability of adoption and the conditional expected value of the dependent variable.
Thank you for your support,
Best,
Habtamu
Related Posts with Marginal effects of binary explanatory variable after craggit
Comparing GMM estimatesI am trying to write my own GMM program in a different language and want to compare results with Sta…
Problem with -replace- var ... if ... I was suprised to see that the last two commands ("replace new_var = 0 [...] and replace new_var = …
Difference in difference with multiple treatmentsDear Stata community I am experiencing a problem regarding my difference in difference analysis. I…
spmatrix fromdataHi all, I have a question. Recently, I wanted to run the spxtregress command and I checked the Stat…
Work without shapefileHi to everyone. I state that I am new to Spatial Econometrics. My data set is composed of 32 gasolin…
Subscribe to:
Post Comments (Atom)
0 Response to Marginal effects of binary explanatory variable after craggit
Post a Comment