Stata HW 1
Stata HW 1
- I want you to analyze the relationship between earnings and years of schooling from eaef data set.
Please look into the data description PDF to understand the meaning of the variables.
1) Descriptive statistics: Before doing any regression analysis, it is important to familiarize yourself
with the data you are using. This is done by plotting data and computing descriptive statistics; this
will give you an idea about the variables.
summarize earnings s
(Whether you will use Caps for s and years of schooling depend on how it appears on STATA.
I am showing only one command; refer to the class notes for the rest. Email me if you have forgotten
any)
2) Run the command for scatter plot for years of schooling and earnings. Comment on the
relationship between the two variables.
3) Does the histogram for earnings follow a normal distribution? What about years of schooling?
estat hettest
7) After running the regression, you can compute the residuals to get an idea of how accurate the
model is and what the residuals look like, i.e. are they normally distributed?
generate S_res=S-S_fit *this calculates the residuals and calls them S_res*
histogram S_res, normal
7) Explain the three assumptions of OLS (explain in your own words instead of copying from the
slides)
You should also record the results in a word doc for me to check on Monday.