Code
if(!"maps" %in% installed.packages()) install.packages("maps")
library("maps")
map("world", col = "grey", interior = FALSE)
All materials can be found at alexcardazzi.github.io.
Completion Requirements: Complete the following questions in RStudio via the homework template. When you are ready, submit your rendered html
to Canvas.
Grading Criteria: Full credit will be given to correct, well formatted, and detailed answers. Partial credit will be given if I can follow your work and/or see your thought process via code, comments, and text. Point totals are listed next to each question.
One of the most famous economics papers in Gary Becker’s Crime and Punishment. In this paper, Becker theorizes that criminal behavior is “rational” when the benefits of crime outweigh the economic costs of crime. In math:
\[E[\text{Crime}] = P(\text{Sanction})\times\text{Sanction} + [1-P(\text{Sanction})]\times\text{Rewards}\]
where \(\text{Sanction}\) represents the fines, jail time, or lost opportunities incurred by the criminal (a negative value) if caught, \(P(\text{Sanction})\) is the probability of getting caught, and \(\text{Rewards}\) are the benefits of getting away with the criminal act (a positive value). In Becker’s model, these three factors jointly determine the expected value of crime. This can also be thought of as an opportunity cost story. All else equal, in this model, crime is more costly to those earning high wages compared to those earning low wages since there’s more to lose.
Flückiger & Ludwig (2015) investigate Becker’s model of crime by thinking about piracy and fishing.
Commercial fishing requires boats, and boats can be used to fish or for other purposes, such as piracy. The only barrier to entry into both markets is owning one of these boats. Flückiger & Ludwig then ask the question: do worse fishing conditions lead boat owners to turn to piracy?1
The data used in this paper can be found here. It is recommended that you read the paper, which can be found on Canvas, before completing this homework.
The authors in this paper use an instrumental variable approach to estimate the causal effect of fishing conditions on piracy.
The data for this homework can be found here. Use this data to complete this homework.
Read the data into R. Save the data as an object called pirates
. (1 Points)
Generate a summary statistics table using modelsummary()
. (1 Points)
Create some data visualizations:
pirates
onto the map. The colors of the points should correspond to the continent they are assigned in pirates
. (1 Points)if(!"maps" %in% installed.packages()) install.packages("maps")
library("maps")
map("world", col = "grey", interior = FALSE)
Take a look at Table 2 from Flückiger & Ludwig. Use pirates
to answer the following parts.
Replicate the parameter estimates from Columns 2-3 and 6-7 from Table 2.2 (3 Points)
Display the coefficients in a table generated via modelsummary
. (2 Points)
What is the general interpretation of these results? (2 Points)
Take a look at Table 3 from Flückiger & Ludwig. Use pirates
to answer the following parts.
Replicate Columns 1 and 2 from Table 3.3 (3 Points)
Display these coefficients in a table generated via modelsummary
. Order the regressions as Column 1’s replication, the first of Column 2, and then Column 2’s replication. (2 Points)
Use fitstat()
to display the F-statistic and the Wald-statistic. What are the general takeaways from these tests? (1 Points)
Discuss the IV assumptions.
As a note, fisheries represent a classic economic common pool resource that can be plagued by overuse (economists call this the “tragedy of the commons”). Because of this, various extra-governmental agencies monitor commercial fishing activity, generating good data on commercial fish production by country. International trade depends heavily on oceanic transport, and piracy represents an important threat to the free flow of goods across countries, leading to systematic data collection on acts of piracy.↩︎
You’ll notice that some of the regressions require continent-specific-trends. This is another word for varying slopes. See this information for help. In addition, be sure to cluster your standard errors.↩︎
Note: check out this vignette for information about how to estimate instrumental variables via 2SLS with fixest
.↩︎