Scroll down to the country Uganda and click the link icon on this row.
Click on “Get Microdata.” On the next page, click on “Go to Data User Agreement.”
On the form, state that you are using the data for educational purposes in a class assignment and will not be publishing any papers with the data.
Download the data in Stata format.
Move the dataset from your downloads folder to your Raw_Data folder in your Section Assignments folder.
Create a new master do-file for the assignment and start a new do-file called “151029_welfare_effects.do” that you will call from your master do-file.
We will now select the datasets we need in order to examine the relationship between consumption of particular goods (fuel and electricity) and income. (GSEC1 (survey weight), GSEC10 (fuel), GSEC10a (electricity), GSEC11 (income)). We want the following variables: wgt09 (weight), h10q17a (fuel expenditure), h11aq06 (income), h10q4 (electricity quantity)
Rename the datasets to reflect the variable of interest that they contain. Join the datasets together using the household identifier (HHID) and the joinby command:
joinby HHID using uganda09income.dta
Conduct summary analysis on income, fuel expenditure, and quantity of electricity consumed:
hist ln_inc if ln_inc>=10 & ln_inc<=15
hist elec if ln_inc>=10 & ln_inc<=15
hist fuel_exp if ln_inc>=10 & ln_inc<=15
Plot the kernel regression of fuel expenditure on income and then electricity consumption on income:
twoway lpoly elec ln_inc if ln_inc>=10 & ln_inc<=15
twoway lpoly fuel ln_inc if ln_inc>=10 & ln_inc<=15