The assignment is worth 100 points. You should have the following packages installed:
library(tidyverse)
library(patchwork)
library(kableExtra)
library(margins)In this problem set you will summarize the paper “Imperfect Public Monitoring with Costly Punishment: An Experimental Study” (Ambrus and Greiner, AER 2012) and recreate some of its findings.
[Q1] What is the main question asked in this paper?
The main question asked in this paper is how punishment affects cooperation under an imperfect monitored environment.
[Q2] Summarize the experiment design.
There are 3 participants that play in public good contribution games for 50 rounds. The two treatments of the experiment are perfect and imperfect monitoring. Perfect monitoring has complete transparency around each player’s contribution. Imperfect monitoring leads to a 10% chance that contribution levels seen by others will be reversed. After each game, there is a punishment stage where contributions by each player are evaluated by the other players and assigned a punishment. The severity of the punishment is determined by the other players.
[Q3] Summarize the main results of the experiment.
The results of the experiment for the perfect monitoring are that increasing the severity of the punishment increase the payoffs. The results for the imperfect monitoring were that as the games went on and player’s learned more about the other players contribution, the severity of the punishment changed.
[Q4] Why are these results valuable? What have we learned? Motivate your discussion with a real-world example. In particular discuss the tradeoffs to transparency in groups and how these tradeoffs might be navigated in a firm, or more broadly, a society.
The results are very valuable because they show that punishment improves cooperation, as long as there is perfection monitoring of contributions. A real world example of this would be a team that has a goal to meet. This example could be a marketing team that has a monthly goal to hit x number of new users signed up. The monitoring would be a public performance board that shows the number of new users per marketing analyst. Imperfect monitoring would be if each analyst could not see each others’ user progress. The severity of the punishment could be the analyst who signs up the least at the end of the month would be fired.
[Q5] If punishment is ineffective under imperfect monitoring, what else can you lean on to ensure people cooperate (at least a little) in a public goods problem?
When punishment is ineffective, incentives can be used to boost cooperation. In the previous example, the severity of punishment can be flipped to the severity of incentive. The analyst with the highest number of new users could be rewarded with a bonus at the end of the month, instead of the analyst with the lower number of new users being fired.
Payoffs to agent \(i\) are
\[ \pi_i = (e_i - x_i) + \alpha \sum_{i=1}^n x_i \]
where \(e_i\) is the agent’s endowment, \(x_i\) is her contribution to the public good, \(\alpha\) is the marginal per capita return, and \(n\) is the group size.
[Q6] Explain \(\alpha\) and why in public goods game requires \(\frac{1}{n} < \alpha < 1\).
The alpha variable represents the return on the public good from the cumulative contribution of the group. Alpha is typically less than one, which puts a strain on the individual to choose whether or not to contribute more or less. The alpha makes the individual’s return on contribution negative, although it may be better off for the group as a whole.
[Q7] Suppose \(e_i = e = 20\) (i.e. everyone has 20), \(\alpha = 0.4\) and \(n=4\). Show that \(x_i = 0\) is a symmetric Nash equilibrium, but \(x_i=20\) is the social optimum. (Recall that in a Nash equilibrium \(i\) cannot increase her payoff by changing her contribution.) Hint: you can use code to answer this problem by calcuting payoffs to a representative agent and plotting them. You might the
curve()function useful.
pi <- function(x
, e=20
, alpha=0.4
, X=0*20
){
pi = (e-x) + alpha*(X+x)
return(pi)
}
curve(expr = pi, from = 0, to = 20)setwd("/Users/spoll/OneDrive/Documents/Boston College/Behavioral Economics/Week 6")
punnoise = read.csv("punnoise_data.csv"
, check.names = FALSE
, stringsAsFactors = FALSE
, na.strings = ""
)Use theme_classic() for all plots.
[Q8] Recreate Table 1 and use
kable()to make a publication-quality table (in HTML).
colnames(punnoise)[1] = "treat"
table1 = data.frame(punnoise$treat
, punnoise$contribution
, punnoise$received_punishment
, punnoise$income
)
colnames(table1) = c("treat"
, "contribution"
, "received_punishment"
, "income"
)
table1_kbl = table1 %>%
group_by(treat) %>%
summarise(mean(contribution)
, mean(received_punishment)
, mean(income)
)
colnames(table1_kbl) = c("treat"
, "mean_contribution"
, "mean_punishment"
, "mean_net_profits"
)
table1_kbl %>%
kbl(caption = "Table 1 - Average Contributions, Punishment, and Net Profits in Treatments") %>%
kable_classic(full_width = F
, html_font = "Cambria")| treat | mean_contribution | mean_punishment | mean_net_profits |
|---|---|---|---|
| nopun_noise | 4.035088 | NA | 22.01754 |
| nopun_nonoise | 5.592982 | NA | 22.79649 |
| pun_noise | 9.600000 | 1.4460000 | 19.10367 |
| pun_nonoise | 12.400000 | 0.6400000 | 23.65614 |
| strongpun_noise | 16.037037 | 0.6481481 | 23.48148 |
| strongpun_nonoise | 17.607407 | 0.4792593 | 25.44889 |
Consider the linear model
\[ y = \alpha + \beta_1 x_1 + \beta_2 x_2 + \varepsilon \]
[Q9] Write down the marginal effect of \(x_1\) (in math).
Essentially, the partial derivative of x_1 with respect to y is the marginal effect.
dx_1/dy = beta_1
Now suppose you have a non-linear model
\[ y = F(\alpha + \beta_1 x_1 + \beta_2 x_2 + \varepsilon) \]
where \(F(\cdot)\) is a “link function” that compresses the inputs so that the output \(\hat{y} \in [0,1]\).
[Q10] Write down the marginal effect of \(x_1\). How does this compare to the marginal effect in the linear model?
dx_1/dy = beta_1 * F
The marginal effect in this case is determined by the link function, not just the Beta 1 variable.
[Q11] A probit model uses the Normal CDF \(\Phi\) as the link function, where \(\Phi' = \phi\) is the Normal PDF. Use
glm()to estimate Model 1 in Table 2. Assign the model to the objectm1. Cluster the standard errors at the group level.
m1 = glm(contr_dummy ~ round + p_reg + p_strong + noise + noise__p_reg + noise__p_strong
, family = binomial(link = 'probit')
, data = punnoise
)
summary(m1, cluster = "group")##
## Call:
## glm(formula = contr_dummy ~ round + p_reg + p_strong + noise +
## noise__p_reg + noise__p_strong, family = binomial(link = "probit"),
## data = punnoise)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.0741 -0.8125 0.5018 0.9714 1.8030
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.5660869 0.0311397 -18.179 < 2e-16 ***
## round -0.0007022 0.0007303 -0.961 0.3363
## p_reg 0.8894465 0.0345661 25.732 < 2e-16 ***
## p_strong 1.7600634 0.0400362 43.962 < 2e-16 ***
## noise -0.2518140 0.0365821 -6.884 5.84e-12 ***
## noise__p_reg -0.1038117 0.0493212 -2.105 0.0353 *
## noise__p_strong -0.0761898 0.0554592 -1.374 0.1695
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 23399 on 16949 degrees of freedom
## Residual deviance: 18848 on 16943 degrees of freedom
## AIC: 18862
##
## Number of Fisher Scoring iterations: 4
[Q12] Interpret the coefficients. (For more on the probit model, see the appendix.)
Based on the coefficients, most of the predictors have a negative effect on contribution. The two predictors that had a positive effect on contribution were p_strong and p_reg, which means any increase to these variables will increase contribution.
[Q13] Table 2 reports the average marginal effects (AMEs) of the variables on \(P(\text{contribute})\). Calculate the AME to the variable
roundas follows:
predict()to create an object predictions that contains the predicted z-scores. (i.e. \(\hat{\mathbf{X}\beta}\). Hint: use the option type="link" in predict().)predictions = predict(m1
, type = "link"
)
summary(predictions)## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -0.85301 -0.58434 -0.03507 0.12618 0.84561 1.19327
dnorm() to calculate the probabilities of the predicted z-scores and store the output in an object called index.index = dnorm(predictions)
summary(index)## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.1958 0.2781 0.3334 0.3146 0.3810 0.3987
round and store the output in dydxround.dydxround = index * -0.0007021582mean() to calculate the AME.mean(dydxround)## [1] -0.0002208822
[Q14] Verify your calculations with
margins(), the plot the AMEs. (Note: these will not be exactly the same as those in the paper, since the paper uses an outdated method in Stata.
ame_margins = margins(m1
, data = punnoise)
summary(ame_margins)## factor AME SE z p lower upper
## noise -0.0792 0.0115 -6.9075 0.0000 -0.1017 -0.0567
## noise__p_reg -0.0327 0.0155 -2.1061 0.0352 -0.0630 -0.0023
## noise__p_strong -0.0240 0.0174 -1.3738 0.1695 -0.0582 0.0102
## p_reg 0.2798 0.0102 27.4384 0.0000 0.2598 0.2998
## p_strong 0.5537 0.0104 53.0165 0.0000 0.5332 0.5741
## round -0.0002 0.0002 -0.9615 0.3363 -0.0007 0.0002
plot(ame_margins)[Q15] Interpret the AMEs.
The plot above shows the average marginal effects per predictor. The round, p_reg, and p_strong predictors have negative AMEs, while the noise and noise_p_reg predictors have a positive AME. However, the positive predictors in the table are p_reg and p_strong so I’m not too sure why those are not plotting correctly. Those predictors have a significant impact on contribution as p_reg increases contribution by 28% and p_strong increases contribution by 55.4%. All of the negative predictors only affect contribution negatively by less than 1%.