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
Categorical Bar Chart (Binary Variables) with Multiple VariablesHi Users, Another graphing question. I have a list of 8 adoption barriers in which survey responden…
Sample split or interactions in fixed effects regressionDear Stata community, I'm currently analyzing whether capital controls affect economic development …
Instrumental variable with between effectsDear All, I hope you are all fine. My data set is panel data and I am doing my analysis using betwee…
graph that shows the evolution over 10 yearsHi guys, We have drawn 10 individual histograms for working hours from 2004 to 2013 in Belgium. No…
xtpcse or xtsccHi Dear, Can you please tell me what is the criteria to choose between xtpcse and xtscc commands fo…
Subscribe to:
Post Comments (Atom)
0 Response to Marginal effects of binary explanatory variable after craggit
Post a Comment