Economics Homework Help

Economics Homework Help. Problem set

In this problem set you will summarize the paper “Do Workers Work More if Wages Are High? Evidence from a Randomized Field Experiment” (Fehr and Goette, AER 2007) and recreate some of its findings

2 Replication

Use theme_classic() for all plots.

2.1 Correlations in revenues across firms

For this section please use dailycorrs.csv.

dailycorrs = read_csv("../data/fehr_goette_2007/dailycorrs.csv")

[Q8] The authors show that earnings at Veloblitz and Flash are correlated. Show this with a scatter plot with a regression line and no confidence interval. Title your axes and the plot appropriately. Do not print the plot but assign it to an object called p1.

# your code here

[Q9] Next plot the kernel density estimates of revenues for both companies. Overlay the distributions and make the densities transparent so they are easily seen. Title your axes and the plot appropriately. Do not print the plot but assign it to an object called p2.

# your code here

[Q11] Now combine both plots using library(patchwork) and label the plots with letters.

# your code here

2.2 Tables 2 and 3

For this section please use tables1to4.csv.

# your code here

2.2.1 Table 2

On page 307 the authors write:

“Table 2 controls for individual fixed effects by showing how, on average, the messengers’ revenues deviate from their person-specific mean revenues. Thus, a positive number here indicates a positive deviation from the person-specific mean; a negative number indicates a negative deviation.”

[Q12] Fixed effects are a way to control for heterogeneity across individuals that is time invariant. Why would we want to control for fixed effects? Give a reason how bike messengers could be different from each other, and how these differences might not vary over time.

[your written answer here]

[Q13] Create a variable called totrev_fe and add it to the dataframe. This requires you to “average out” each individual’s revenue for a block from their average revenue: xfei=xitx¯ixife=xitx¯i where xfeixife is the fixed effect revenue for ii.

# your code here

[Q14] Use summarise() to recreate the findings in Table 2 for “Participating Messengers” using your new variable totrev_fe. (You do not have to calculate the differences in means.)
In addition to calculating the fixed-effect controled means, calculate the standard errors. Recall the standard error is sjtnjtsjtnjt where sjtsjt is the standard deviation for treatment jj in block tt and njtnjt are the corresponding number of observations.
(Hint: use n() to count observations.) Each calculation should be named to a new variable. Assign the resulting dataframe to a new dataframe called df_avg_revenue.

# your code here

[Q15] Plot df_avg_revenue. Use points for the means and error bars for standard errors of the means.

To dodge the points and size them appropriately, use

geom_point(position=position_dodge(width=0.5), size=4)

To place the error bars use

geom_errorbar(aes(
  x=block, 
  ymin = [MEAN] - [SE], ymax = [MEAN] + [SE]),
  width = .1,
  position=position_dodge(width=0.5))

You will need to replace [MEAN] with whatever you named your average revenues and [SE] with whatever you named your standard errors.

# your code here

[Q16] Interpret the plot.

[your written answer here]

2.2.2 Table 3

[Q17] Recreate the point estimates in Model (1) in Table 3 by hand (you don’t need to worry about the standard errors). Assign it to object m1. Recreating this model requires you to control for individual fixed effects and estimate the following equation where HH is the variable high, B2B2 is the second block (block == 2) and B3B3 is the third block (block == 3):

yijty¯ij=β1(HijtH¯ij)+β2(B2ijtB2¯ij)+β3(B3ijtB3¯ij)+(εijtε¯ij)yijty¯ij=β1(HijtH¯ij)+β2(B2ijtB2¯ij)+β3(B3ijtB3¯ij)+(εijtε¯ij)

# your code here

[Q18] Now recreate the same point estimates using lm and assign it to object m2. You are estimating the model below where where FiFi is the dummy variable for each messenger (fahrer). Make sure to cluster the standard errors at the messenger level. (Use lmtest and sandwhich for this.)

yijtβ0+β1Hijt+β2B2ijt+β3B3ijt+i=1nαiFi+εijtyijtβ0+β1Hijt+β2B2ijt+β3B3ijt+i=1nαiFi+εijt

# your code here

[Q20] Now use feols to recreate Model (1), including the standard errors. Assign your estimates to the object m3. You are estimating the model below where where αiαi is the individual intercept (i.e. the individual fixed effect):

yijt=αi+β1Hijt+β2B2ijt+β3B3ijt+εijtyijt=αi+β1Hijt+β2B2ijt+β3B3ijt+εijt

# your code here

[Q21] Compare the estimates in m1, m2 and m3. What is the same? What is different? What would you say is the main advantage of using felm()?

[your written answer]

[Q22] Explain why you need to cluster the standard errors.

[your written answer]

Economics Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"