Homework 2
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.
In 1975, Sam Peltzman published a famous study of automobile safety regulation. His argument, now known as the Peltzman effect or risk compensation, was that safety mandates can partially (or fully) offset themselves: when people are shielded from the consequences of dangerous behavior, they behave more dangerously. Drivers with seatbelts drive faster. Skydivers with better ripcords pull them later. Football players with facemasks lead with their heads.
Professional hockey is a perfect laboratory for this idea. While helmets clearly protect players from injury mechanically, a protected player may also check harder, block more shots, and skate through the middle of the ice with their head down. So the question is not whether helmets protect players holding behavior fixed (they do), but whether helmets make players safer once we account for how helmets change behavior.
In this homework, we are going to explore the question: how does protective equipment affect player injuries?
There are many ways to think through this problem, but let’s start with the following factors that might be related to helmets and injuries:
- Helmet Technology (HT): whether a player wears a modern, high-tech helmet (treatment).
- Aggressive Play (AGG): an index of the player’s style: checking, shot-blocking, playing through traffic, etc.
- Team Culture (TC): the degree to which the player’s coaching staff rewards physical play.
- Experience (EXP): the player’s years of professional experience.
- Referee Strictness (REF): how strictly officials call penalties in the player’s games.
- Injury Risk (INJ): the probability of suffering an injury during the season (outcome).
Now, consider the following relationships between the variables:
- We will test both the direct and total effect of helmet technology on injury risk.
- Helmet technology, through risk compensation, effects how aggressively a player plays.
- Aggressive play will effect the probability of injury.
- Better helmets mechanically protect players. That is, helmet technology effects injury risk directly, holding playing style fixed.
- Experience will effect injury risk due to experience alone (i.e. positioning, knowing when to bail out of a hit) and due to different levels of aggressive play.
- Referee strictness will influence aggressive play.
- Referee strictness will influence injury risk by itself by penalizing other players’ dangerous hits.
- Team culture will influence aggressive play.
Question 1
Using dagitty, Construct and plot a DAG to depict the relationships between these variables. Be sure to indicate which variable is the outcome and which is the treatment. (4 Points)
Question 2
Simulated data for this setting can be found here.
Read the data into an object called
helmetsin R. (0 Points)Create summary statistics using functions from the
modelsummarypackage. (1 Point)
Question 3
Use functions from dagitty to evaluate and explore your DAG. This will help inform your empirical specification and identification strategy. You may use code, words, or both to answer these questions.
List each of the paths in the DAG and tell which are “open”. (2 Points)
For each path, discuss why it is open or closed. Be sure to use terms like “confounder”, “collider”, “mediator”, etc. (2 Points)
- What does it mean, and why is it significant, for a path to be open/closed? (1 Point)
- Which factors do you need to control for to estimate the total causal effect of helmet technology on injury risk? (1 Point)
- Which factors do you need to control for to estimate the direct causal effect of helmet technology on injury risk? You may use
dagittyto help you, but you must provide explanations fordagitty’s output. (1 Point)
Question 4
Using helmets, estimate the (direct and total) causal effects of helmet technology on injury risk.
Estimate the models below. (1 Point)
Display the coefficient estimates in a table generated via functions in
modelsummary. (1 Point)Interpret each coefficient, besides the intercept/constant, in each model. Pay careful attention to the coefficient on helmet technology in each column. How can both estimates be correct at the same time? (2 Points)
- A classmate estimates
lm(INJ ~ HT + AGG, helmets), reasoning that since AGG is the mediator, controlling for it alone should recover the direct effect. Estimate this model. Compare the coefficient on HT to your answer from the previous part, and explain what went wrong using your DAG. (1 Point)
Question 5
Suppose there is an unmeasured variable, pain tolerance (PT), that affects both how aggressively a player plays and how likely they are to be injured (perhaps because high pain tolerance players ignore small injuries until they become big ones). So PT effects AGG and PT effects INJ, but PT appears in no dataset. Does the existence of PT bias your estimate of the total effect? What about the direct effect? Explain using the logic of open and closed paths. (You may modify your DAG in dagitty to check your reasoning.) (2 Points)
Question 6
Think of two additional variables and/or edges that may belong in this DAG. Make an argument for why they belong in the DAG. (1 Point)