## Wednesday, June 27, 2012

### Selection Bias in the use of Fertilizer

* This simulation follows the inherent logic behind the following paper:

* Duflo E, Kremer M, Glennerster R. 2008b. Using randomization in development economics research: a toolkit. In Handbook of Development Economics, Vol. 4, ed. T Schultz, J Strauss, chpt. 15. Amsterdam: Elsevier Sci. Ltd. North Holl.

* We might think that the use of fertilizer might be a no-brainer given the results of experiments done in other countries with different types of soils, water input, climate inputs, but that the return to fertilizer might actually be much lower than we expect for many farmers in poor nations and that is why they are not purchasing and using more fertilizer.

* Let us imagine a sample of 1000 farmers:

clear
set obs 1000

gen farm_id = _n

* Now, let's specify a binary choice production function.

* Where random spatial variation in productivity is:
gen sigma = abs(rnormal())+.2

* The base level of return on any field is:
gen beta = runiform() + .3

* 1. A farmer who does not use fertilizer will get:
*   Y(f=0) = Py*(beta)*sigma

gen Py = runiform()+.5

gen Y0=Py*(beta)*sigma
label var Y0 "Expected return from no-use"

* 2. A farmer who does use fertilizer will have a higher return to yeild but have to pay for fertilizer Pf:
*   Y(f=1) = Py*(beta + alpha)*sigma-Pf

* Each farmer has some unobserved additional return from using fertilizer:
gen alpha = 6*runiform()

* The price of fertilizer is:
gen Pf = runiform()+2

gen Y1 = Py*(beta + alpha)*sigma-Pf
label var Y1 "Expected return from fertilizer use"

* If fertilizer were free than everybody would always use fertilizer.

* If however it costs something then some people will choose not to use fertilizer.

* Farmers will decide between choosing to use fertilizer or not based on expected yeilds:

* Now let's generate the observed data
gen fert = 0
replace fert = 1 if Y0 < Y1
label var fert "Farmer used fertilizer"

gen yeild = Y0
replace yeild = Y1 if Y0 < Y1
label var yeild "Expected Value of Production"

sum fert
* We can see that there is only modest adoption of fertilizer under these parameters.

reg yeild fert
* Even though clearly the use of fertilizer is correlated with higher total yeild.

reg fert alpha Pf Py
* We can see that as unobserved expected gain in yeild with respect to fertilizer increases the use of fertilizer also increases.
* We can also see that as the price of fertilizer goes up less people use it.
* Finally we can see that as the value of the farm product increases then the relative cost of fertilizer drops and people are more inclined to use it.

* Thus the choice of using or not using fertilizer can be easily explained through a rational choice framework.

* If this is the true underlying scenario then their is no efficiency arguments for states, NGOs, or multinations for intervening through the supply or subsidization of fertilizer.

* However, this might not be the whole story.  Imagine the case where producers might be risk averse.

* So that they value different returns based on their personal preferences rather than their monetary value.

* Imagine the case where if a farmer were to get a return of less than gamma then that farmer would run the risk of dieing or having his family die so the farmer will be highly adverse to that scenario.

gen gamma = .2
label var gamma "Minimum stafetly level of yeild"

gen starv_penalty = 9
label var starv_penalty "The penalty that farmers face if part of their expected production is less than gamma"

* So we will say there is a 1/3 possibility of production level alpha_observed=alpha with fertilizer, 1/3 of production level alpha_observed=(1/4)*alpha with fertilizer, and alpha_observed=(7/4) * alpha

* The expected value of production with fertilizer is still Y1 but now there are two other potential levels of production:

gen Y2= Py*(beta + alpha*(1/4))*sigma-Pf
gen Y3= Py*(beta + alpha*(7/4))*sigma-Pf

* Now lets first check to make sure none of the Y1-Y3 range of production is going to be less than gamma
forv i=0/3 {
gen Y`i'_util = Y`i'
* If any of the range of production levels is less than gamma then that production is heavily penalized:
replace Y`i'_util = Y`i' - starv_penalty if Y`i' < gamma
}

* In this simplified framework there is no variance of return from not using fertilizer so Y0_utility = Expected Utility from not using fertizer.

* However, there is variable returns from using fertilizer so:

gen Y_fert_utility = (1/3)*(Y1_util+Y2_util+Y3_util)

* Now let's generate the choice of fertilizer usage
gen fert2 = 0
replace fert2 = 1 if Y0_util < Y_fert_utility
label var fert2 "Farmer used fertilizer"

* Now let's see what the yeild is if farmers are starvation adverse.
gen yeild2 = Y0 if fert2 == 0
replace yeild2 = Y1 if fert2 == 1
label var yeild2 "Expected Yeild of Farming Choice: Under Safetly First Utility"

sum yeild*
sum fert*
* Thus we can see that though the expected value of using fertilizer at a higher rate might lead to net gains in expected production, farmers might choose not to because they find the range of returns from fertilizer use too risky.

reg yeild2 fert2
* So only the farmers who know that even in the worse case scenario they are going to have enough to survive end up using fertilizer.
* These farmers are also the farmers that have the most to gain from using fertilizer, thus it looks extremely effective.

reg fert2 alpha Pf Py
* Interestingly we can see that under risk aversion, the different parameters entering into production are less effective at predicting the choice of using fertilizer or not.

* I think this is caused by the extreme flatness found in the use of fertilizer when there is a substantial risk of crop failure.