Skip to content

Assignment 6 #1171

Description

@albertotrelles

Instructions

Deadline Friday 05/12/25

Create a new repo called CSDiD and work with your group members like in previous assignments. The repo should have the following structure

CSDiD/
├── Python/
│   ├── output/
│   └── scripts/
├── R/
│   ├── output/
│   └── scripts/
  • For visualization purposes, please provide your solutions in Jupyter Notebooks, including code, graphs, and explanations, using Python and R. Don't forget to export graphs to the /output folder.
  • You may choose to place everything in a single notebook or split the work across multiple notebooks, as long as the submissions are in Jupyter Notebook format
  • If you have trouble with Jupyter Notebooks you can use VScode or some other IDE, just present things in an orderly manner and clearly respond to questions as comments when required. Also export tables to the /output folder if you won't present your results in Jupyter Notebooks.
  • You can load the data by calling the link. However, if you load locally without the link please include an input folder with the data in it.

Question 1 — TWFE & Event-Study (Total: 8 points)

a) TWFE

Load the dataset available:
https://raw.githubusercontent.com/LOST-STATS/LOST-STATS.github.io/master/Model_Estimation/Data/Event_Study_DiD/bacon_example.csv

Note that asmrs is the outcome variable, pcinc, asmrh and cases are controls. The dataset already includes treatment and post-treatment variables.

Estimate a Two-Way Fixed Effects (TWFE) regression with unit and time fixed effects.

Points:

  • TWFE regression: 2

b) Cleaning for Event-Study

  1. Create the relative time variable (event time = time − treatment time).
  2. Provide a frequency table or descriptive summary of event time.
  3. Based on the distribution, choose reasonable upper and lower bounds for grouping extreme event times.
  4. Question: Why do we usually group very distant event times together?
  5. Create relative-time dummy variables.

Points:

  • Relative time creation: 1.5
  • Frequency table: 0.5
  • Choosing bounds: 0.5
  • Question: 0.5
  • Dummy creation: 1

c) Event-Study Estimation

  1. Estimate an Event-Study model using the relative-time dummies.
  2. Store coefficient estimates and standard errors.
  3. Plot the event-study coefficients with confidence intervals.

Points:

  • Estimation: 1
  • Storing results: 0.5
  • Plot: 0.5

Question 2 — CSDiD (Total: 12 points)

a) Estimation

Using CSDiD, estimate ATT(g,t). Present results in a clean table.
(You may choose which controls to include.)

Points:

  • CSDiD estimation: 2
  • ATT(g,t) table: 1

b) Aggregations

Compute and present:

  1. Aggregation by group
  2. Aggregation by period
  3. Aggregation by event-time

Points:

  • Aggregations: 3

c) Explanation of Aggregations

Explain:

  • Meaning of aggregation by group
  • Meaning of aggregation by period
  • Meaning of aggregation by event-time
  • Question: Which aggregation is most comparable to the TWFE Event-Study coefficients?

Points:

  • Explanations: 1.5
  • Comparison question: 1

d) Compare CSDiD and Event-Study Results

  1. Create a table comparing:
    • Event-time aggregated ATT from CSDiD
    • Event-study coefficients from the TWFE model
  2. Produce a combined coefficient plot.
  3. Provide a brief comparison.

Points:

  • Comparison table: 1
  • Combined plot: 1
  • Discussion: 1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions