Computer tutorials¶
Note
Answers to exercises will only be provided during class time. If you cannot make it to class, you will need to see me during consultation times and we will work through the exercises together. (When you see me during consultation times, I expect you to be prepared. I will never merely provide answers to exercises. Instead, I want to see good faith effort on your part in which case I will be more than happy to help you work throught the exercises.)
Week 1¶
None
Week 2¶
Additional Empirical Exercise 4.3 and 5.3 (Stock and Watson, updated 3rd edition)
You can find these exercises on the book’s companion website: <http://wps.pearsoned.co.uk/ema_ge_stock_ieupdate_3/251/64413/16489878.cw/index.html>
You will use the CollegeDistance
data
that were collected in the U.S.; here you can find its description
.
You should be able to solve these exercises on your own. Complete your computer work using so-called Stata do-files’. In `do-files we store several lines of Stata code at the same time and we can execute them sequentially from top to bottom.
For the exercises given here, the starting point for your do-file should be the following lines:
// ====================================================
// PREAMBLE
// ====================================================
clear all // clear memory
capture log close // close any open log files
set more off // don't pause when screen fills
// set work directory (put your own path here!):
cd /path/to/location/on/your/computer/where/Stata/files/go
log using week_2.log, replace // open new log-file
// ====================================================
// Work on your data set
// ====================================================
use "CollegeDistance_Stata12.dta" // loading data set (needs to be in work directory)
// ====================================================
// Postscript
// ====================================================
log close // close log-file
Week 3¶
Additional Empirical Exercise 8.2, parts a through f (Stock and Watson, updated 3rd edition)
This exercise uses the same data as last week. Make sure to use a do-file again!
After you have worked through the exercise, discuss the internal validity of the estimates that you have obtained through OLS.
Week 4¶
Empirical Exercise 12.2, parts a and b (Stock and Watson, updated 3rd edition)
You will use the Movies
data
that were collected in the U.S.; here you can find its description
.
Week 5¶
Empirical Exercise 12.1 (Stock and Watson, updated 3rd edition)
You will use the Fertility
data
that were collected in the U.S.; here you can find its description
.
Week 6¶
Empirical Exercise 12.2, parts c, d, e, and f (Stock and Watson, updated 3rd edition)
Week 7 and 8¶
Dana Burde and Leigh Linden, in their 2013 paper
in the
American Economic Journal: Applied Economics, conduct a randomized controlled trial in which they
randomly ‘treat’ rural villages in Afghanistan with public primary schools. Their main research
questions are
- Does supply of primary schooling increase enrollment of children?
- Does schooling improve children’s test scores?
Burde and Linden study these two questions with a particular focus on the apparent gender gap in Afghanistan (where boys are traditionally privileged and girls are discriminated against).
Here is your job:
- (Week 7) Take 15 to 20 minutes to read the paper; then answer the following questions:
- What is the main research question?
- How large (or low) are school participation rates in Afghanistan? Is there a gender gap in enrollment?
- Describe the broad setup of the RCT.
- If you conduct an observational study instead of an RCT, what would the endogeneity problem consist of?
- What data are being collected?
- Discuss Tables 1 and 2.
- What econometric method is being used?
- Summarize the main results. Discuss Tables 4 and 5.
- What are the main shortcomings of this research?
- (Week 8) Burde and Linden have made available their data. Use the data sets to replicate their results. In particular, try to replicate Tables 2, 4 and 5.
Week 9¶
Empirical Exercise 11.1, parts a through f (Stock and Watson, updated 3rd edition)
You will use the Employment_08_09
data that
were collected in the U.S. during the early stages of the global financial crisis; here you can find
its description
.
Week 10¶
Empirical Exercise 11.2 (Stock and Watson, updated 3rd edition)
You will use the Smoking
data that
were collected in the U.S. during the early stages of the global financial crisis; here you can find
its description
.
Week 11 and 12¶
Empirical Exercise 10.1 (Stock and Watson, updated 3rd edition)
You will use the Guns
data; here you can find its
description
.
Regress
lnvio
onshall
separately for the years 1977 and 1999. What is the causal effect?Run a pooled regression across all years.
Can you think of an unobserved variable that varies by state but not across time? How about one that varies across time but not by state?
Run a regression of the first differences of
lnvio
andshall
. What is the causal effect? How does it compare to part (a)? Why should the estimate be different theoretically?Run an \((n-1)\)-binary regressors estimation of
lnvio
onshall
.Run a fixed effects estimation of
lnvio
onshall
. Do it in two different ways:
- Hard way: demean the variables yourself and regress demeaned variables on each other.
- Lazy way: use Stata’s inbuilt fixed effect estimation command.
How do the results differ to part (e)?
Add the explanatory variables
incarc_rate
,density
,avginc
,pop
,pb1064
,pw1064
, andpm1029
to the estimation.Now also control for time fixed effects. Do it in three different (yet equivalent) ways:
- Entity demeaning with \((T-1)\)-binary time indicators
- Time demeaning with \((n-1)\)-binary entity indicators
- \((T-1)\)-binary time indicators and \((n-1)\)-binary entity indicators
Redo the main estimation using the logarithms of
rob
andmur
instead ofvio
as outcome variables. How do your findings change?