首页 >
> 详细

Problem Set 2

Behavioral Economics, Fall 2019

The assignment is worth 100 points 100 points. There are 26 questions 26 questions. You should have the following packages installed:

library(tidyverse)

library(cowplot)

library(lfe)

library(stargazer)

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.

1 Big picture

1. What is the main question asked in this paper?

2. Recall the taxi cab studies where reference dependence is studied using observational data. What can an experimental study do that an

observational study can’t?

3. Summarize the field experiment design.

4. Summarize the laboratory experiment design. Why was it included with the study?

5. Summarize the main results of the field experiment.

6. Summarize the main results of the laboratory experiment.

7. Why are these results valuable? What have we learned? Motivate your discussion with a real-world example.

2 Theory

Suppose the messenger’s utility function is

where is the wage rate in time , is the messenger’s e!ort, is the marginal utility of lifetime wealth, and is the

messenger’s cost function constant disutility of e!ort and exogenous disutility shock . Since , you can assume .

8. Show that the messenger chooses a level of e!ort so that the marginal benefit of working equals the marginal cost.

9. Show that the messenger in equilibrium responds to higher wages with higher e!ort.

10. Write an R function that calculates for di!erent levels of . Set default values of . Then use curve() to plot the labor supply for

.

11. Now suppose utility is given by

12. Show that how the messenger in equilibrium responds to higher wages depends on the reference point . (Hint: recall there are three cases to

consider.)

13. Once more write an R function that calculates for di!erent levels of . Set default values of , and . Then use

curve() to plot the labor supply for .

3 Replication

Use theme_classic() for all plots.

3.1 Correlations in revenues across firms

For this section please use dailycorrs.csv .

14. 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

15. 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

16. Now combine both plots using cowplot and label the plots with letters.

# your code here

3.2 Tables 2 and 3

For this section please use tables1to4.csv .

3.2.1 Table 2

On page 307 the authors write:

Table 2 controls for individual fixed e!ects 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 personspecific

mean; a negative number indicates a negative deviation.

17. Fixed e!ects are a way to control for heterogeneity heterogeneity across individuals that is time invariant. time invariant. Why would we want to control for fixed e!ects?

Give a reason how bike messengers could be di!erent from each other, and how these di!erences might not vary over time.

18. 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: where is the fixed e!ect revenue for .

# your code here

19. 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 di!erences in means.) In addition to calculating the fixed-e!ect controled means, calculate too the standard errors. Recall the

standard error is where is the standard deviation for treatment in block and 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

20. Plot df_avg_revenue . Use points for the means and error bars for standard errors of the means. Note the following:

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 need to replace [MEAN] with whatever you named your average revenues and [SE] with whatever you named your standard errors.

# your code here

21. Interpret the plot.

3.2.2 Table 3

22. 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 . To

recreate this model requires you to control for individual fixed e!ects and estimate the following equation:

where is the variable high , is the second block ( block == 2 ) and is the third block ( block == 3 ).

# your code here

23. Now recreate the same point estimates (ignoring the standard errors again) using lm and assign it to object m2 . You are estimating

where is the dummy variable for each messenger ( fahrer ).

# your code here

24. Now use the function felm() (https://www.rdocumentation.org/packages/lfe/versions/2.8-3/topics/felm) from the lfe package to recreate

Model (1), including the standard errors. Assign your estimates to the object m3 . You are estimating

where is the individual intercept (i.e. the individual fixed e!ect). Note that the function call works as follows:

felm([y]~[x] | [grouping variable] | 0 | [clustering varaible], [name of data])

# your code here

25. Compare the estimates in m1 , m2 and m3 . What is the same? What is di!erent? What would you say is the main advantage of using felm() ?

26. Recreate all of Table 3 and use stargazer() (https://cran.r-project.org/web/packages/stargazer/vignettes/stargazer.pdf) to print the results.

# your code here

yijt − y¯ = ( − ) + ( − ) + ( − ) + ( − ) ij β1 Hijt H¯ ij β2 B2ijt B2¯ ij β3 B3ijt B3¯ ij εijt ε¯ijH B2 B3

yijt − β0 + β1Hijt + β2B2ijt + β3B3ijt + ∑ +i= 1nαiFi εijtFi

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

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp

- Data Visualisation And Analytics Assi... 2019-11-15
- Block Breaker Assignment Game Engine ... 2019-11-15
- Data Visualisation And Analytics 2019 2019-11-15
- Event Driven Computing 2019 Assignment... 2019-11-15
- Fit1043 Assignment 3 2019-11-15
- Event Driven Computing Assignment 3 - ... 2019-11-15
- 代做data Ming作业、代写systematic课程作业、代写r编程语言 2019-11-15
- Cs210留学生作业代做、Java编程语言作业调试、Java课程设计作业代写 2019-11-15
- 代写stat 385作业、代做r程序语言作业、代写r课程设计作业、Progr 2019-11-15
- 代写cpeg 222作业、Java，C/C++程序语言作业调试、Python 2019-11-15
- Ece 547作业代做、代写python编程设计作业、代做networks留 2019-11-15
- Csc8202作业代做、Web编程语言作业代写、代做web、Html课程设计 2019-11-15
- 代写mathematics课程作业、Matlab编程语言作业代做、代写mat 2019-11-15
- 代做pyopencl留学生作业、Python程序设计作业调试、Python实 2019-11-15
- Rtos Kernel作业代做、代写python，C++程序语言作业、代做j 2019-11-14
- Algorithm课程作业代写、代做r课程设计作业、R编程语言作业调试、代写 2019-11-14
- 代做fpu留学生作业、代写python，Java编程设计作业、代写c++语言 2019-11-14
- 代写msc/Icy课程作业、代写software留学生作业、代做java语言 2019-11-14
- Cse105留学生作业代做、Java程序语言作业调试、代做programmi 2019-11-14
- 代写fm 9528留学生作业、代做risk Analytics作业、Java 2019-11-14