Program used is R Studio.
Be sure to upload your final code and typed answers on Carmen. Consider the following model: log(farm revenuei) = Xiβ + i where i is an index of individual farmers in the 2009/10 Uganda National Household Survey, i is an error term and Xi is a vector of explanatory variables for the i th farmer (see dataset f armdata.csv). Besides the intercept, Xi includes all variables listed in Table 1 below–excluding the dependent variable and the variable comm.
1. Do a t-test of differences of means between fertilizer adopters and non-adopters for farm revenue and the remaining independent variables. Report (in separate columns) the means of the variables along with the significance level (p-value) of the test of difference of means for fertilizer adopters and non-adopters. Briefly discuss your findings.
2. Estimate the econometric model above by ordinary least squares. Report OLS estimates of the model along with both conventional and community-level clustered (or clusterbootstrapped) standard errors in one table.
3. Implement the LASSO regularization method of variable selection and report your estimation results.
4. Implement Forward Selection approach for variable selection using the Schwarz Bayesian criterion (SBC); report your results.
5. Discuss the data (including any concerns you may have); interpret and comment on the overall results in light of econometric theory and economic intuition.
1 Variable Name Definition farmrev Annual farm revenue per hectare (local currency) farmsize Farm size (hectares) extvisits Number of extension visits agehead Age of the household head hhavgeduc Average of formal years of schooling of household members aged at least 15 educhead Years of schooling of the household head malehead Indicator variable of gender of household head (1=male) hhsize Household size (number of members 15 years or older) distance Distance to trading center (km) seedtech Indicator of adoption of high yielding seed varieties (1=adopter) fertilizer Indicator of adoption of inorganic fertilizer (1=adopter) comm Unique identifier of the farmer’s community (location) hhid Household identifier