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
Survey Data QuestionI'm trying to analyze data from a national survey. I need to stratify it by weight, stratum and psu.…
How to create a variable that indicates when we have the first non-zero value of another variable - panel dataDear all, I am working with a matched employer-employee dataset from Brazil in which each observati…
How to choice the proper tobit model with several restrictions in the data for fixed models.Dear Statalisters, I am writing for help because I need the following issue: 1) I am studying how …
diffrence in diffrenceHi everyone, this is my first post here so I hope I can get some help I want to measure a model lik…
QUAIDS EstimationHi everyone, Does anyone know a command or ado for QUAIDS estimation that is faster than the in-bui…
Subscribe to:
Post Comments (Atom)
0 Response to Marginal effects of binary explanatory variable after craggit
Post a Comment