关键词 > EMET3006/4301/8001

Applied Micro econometrics, EMET3006/4301/8001 Semester 2, 2022 Tutorial 1

发布时间:2022-08-26

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Applied Micro econometrics, EMET3006/4301/8001

Semester 2, 2022

Tutorial 1 (Week 2)

Open your EMET R project through your le management program. Open either an R script or an RMarkdown document to complete this tuto- rial. I like RMarkdown to keep a record of my output.

Install the following packages:  tidyverse, haven, estimatr, stargazer, cli and rmarkdown if you haven’t already.

Reminder on how to get into R: Open R studio from your folder you created last time.  Don’t open it through the Windows menu.  Begin a new R Markdown le named Tutorial 1 (if the Markdown coding is not working for you then just do this in a script but let me know, maybe I can gure out the issues).

1.  Set the working directory for your console from the les window (bot- tom left, More, set working directory)

2. The rst item of code you need is the new location of your workspace: .libPaths("H:/My  Documents/EMET3006 4301 8001")

3. Next load your libraries - you hopefully installed packages already but each time you open your R folder you need to reload the library.  If you want to knit” a document in RMarkdown you need to also have a code chunk that loads your libraries.

Question 1

One of the rst regression analyses was by the statistician G. Udny Yule. Yule (1899) was interested in the causes of poverty in England. Poor people depended on either poor-houses or the local authorities for assistance. Yule wanted to know whether public assistance increased the number of paupers, which is a causal question

1. Download Yule’s data from the 1871 and 1881 English Censuses from Wattle (you can import it as a Stata data set).  Each row of the data is a particular location in England. The second to fourth columns are growth rates for each of four variables between the two census years.

2. Use the data to regress the poverty growth rate on relief as well as age and population.

yule1<-lm(paup  ~  outrelief  +  old  +  pop,  yule) stargazer(yule1,  type  =  "text")

3. How do you interpret the coefficient on outrelief given it’s a percentage change regressed onto a percentage?

4. Discuss the other coefficients.

5. Yule concluded that public assistance (outrelief) increased pauper growth rates.  How convinced are you that all paths between pauperism and  out-relief are blocked once you control for two covariates in a cross-  sectional database for all of England?  Could there be unobserved de-  terminants of both poverty and public assistance?

6. If public assistance causes pauper growth rates, but pauper growth rates also causes public assistance, then why won’t Yule’s regression capture a causal effect of outrelief on pauper growth rates?  Explain the concept of reverse causality with Yule’s data.

Question 2

If treatment is independent of potential outcomes then the sample difference in mean outcomes is equal to the average treatment effect (SDO = ATE). Let’s use a Monte Carlo simulation to check that this is true. We need

a. data on observable outcomes,

b. data on treatment assignment, and

c.  (Yl , Y0 )   D

We call C ·  the independence assumption.  Copy the following text into R either as a script or as a code chunk in RMarkdown (I like Rmarkdown to show the output but I like to build my code as a script rst to deal with bugs in my code).

gap  <-  function()  {

sdo  <-  tibble(

y1  =  c(7,  5,  5,  7,  4,  10,  1,  5,  3,  9), y0  =  c(1,  6,  1,  8,  2,  1,  10,  6,  7,  8), random  =  rnorm(10)

)  %>%

arrange(random)  %>%

mutate(

d  =  c(rep(1,  5),  rep(0,  5)),

y  =  d  *  y1  +   (1  -  d)  *  y0

)  %>%

pull(y)

sdo  <-  mean(sdo[1:5]  -  sdo[6:10])

return(sdo)

}

sim  <-  replicate(1000,  gap())

mean(sim)

This Monte Carlo runs 1 000 times, each time calculating the SDO under

independence which is ensured by the random number sorting that occurs. The ATE is 0.6, what is your SDO? (Mine was .60934)

1. The requirement that treatment be independent of potential outcomes states that a choice made by a person must be independent of what they expect to gain or lose from the choice. Give an example where this is likely true?  What does independence imply about human decision- making?

2. All of the behavioural sciences, including economics, suggest that in- dependence is unlikely to hold outside of an experiment.  What is so special about an experiment where independence will hold?  What is so special about behavior outside an experiment where it is unlikely to hold?

3. What implication does the decision rule of utility maximization from economics have for our ability to appeal to treatment being distributed independent of potential outcomes?