{"schemaVersion":2,"id":"did","title":"Difference-in-Differences","totalStages":29,"modules":[{"id":"did-idea","title":"1 · The DiD idea","summary":"Why comparing one group's before/after change against a control group's change isolates a causal effect.","stageCount":6,"stages":[{"id":"did-idea-01","index":0,"moduleId":"did-idea","moduleIndex":0,"type":"read","title":"Two comparisons are better than one","skillIds":["did.counterfactual-trend"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-idea-02","index":1,"moduleId":"did-idea","moduleIndex":1,"type":"read","title":"The estimator in words and symbols","skillIds":["did.two-by-two-did"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-idea-03","index":2,"moduleId":"did-idea","moduleIndex":2,"type":"code","title":"Compute DiD from four cell means","skillIds":["did.counterfactual-trend"],"estimatedMinutes":10,"difficulty":"applied","points":10},{"id":"did-idea-04","index":3,"moduleId":"did-idea","moduleIndex":3,"type":"interactive","title":"See the four cells move","skillIds":["did.two-by-two-did"],"estimatedMinutes":8,"difficulty":"applied","points":10},{"id":"did-idea-05","index":4,"moduleId":"did-idea","moduleIndex":4,"type":"quiz","title":"Check","skillIds":["did.counterfactual-trend"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-idea-06","index":5,"moduleId":"did-idea","moduleIndex":5,"type":"fillblank","title":"The control group is a what?","skillIds":["did.two-by-two-did"],"estimatedMinutes":4,"difficulty":"applied","points":15}]},{"id":"did-2x2","title":"2 · The 2×2 estimator","summary":"The DiD estimate is exactly the interaction coefficient in a regression of y on treated, post, and their product.","stageCount":7,"stages":[{"id":"did-2x2-01","index":6,"moduleId":"did-2x2","moduleIndex":0,"type":"read","title":"DiD is one regression coefficient","skillIds":["did.did-regression"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-2x2-02","index":7,"moduleId":"did-2x2","moduleIndex":1,"type":"read","title":"Why the interaction equals the double difference","skillIds":["did.parallel-trends"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-2x2-03","index":8,"moduleId":"did-2x2","moduleIndex":2,"type":"code","title":"Estimate the ATT with statsmodels","skillIds":["did.did-regression"],"estimatedMinutes":10,"difficulty":"applied","points":10},{"id":"did-2x2-04","index":9,"moduleId":"did-2x2","moduleIndex":3,"type":"interactive","title":"Noise vs. precision of the ATT","skillIds":["did.parallel-trends"],"estimatedMinutes":8,"difficulty":"applied","points":10},{"id":"did-2x2-05","index":10,"moduleId":"did-2x2","moduleIndex":4,"type":"quiz","title":"Check","skillIds":["did.did-regression"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-2x2-06","index":11,"moduleId":"did-2x2","moduleIndex":5,"type":"quiz","title":"Check","skillIds":["did.parallel-trends"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-2x2-07","index":12,"moduleId":"did-2x2","moduleIndex":6,"type":"truefalse","title":"Equal pre-treatment levels?","skillIds":["did.did-regression"],"estimatedMinutes":3,"difficulty":"applied","points":10}]},{"id":"did-parallel-trends","title":"3 · Parallel trends","summary":"DiD is valid only if the groups would have moved in parallel absent treatment; a pre-trend difference biases the ATT.","stageCount":8,"stages":[{"id":"did-parallel-trends-01","index":13,"moduleId":"did-parallel-trends","moduleIndex":0,"type":"read","title":"The one assumption that matters","skillIds":["did.event-study"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-parallel-trends-02","index":14,"moduleId":"did-parallel-trends","moduleIndex":1,"type":"read","title":"What a violation does to the estimate","skillIds":["did.staggered-adoption"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-parallel-trends-03","index":15,"moduleId":"did-parallel-trends","moduleIndex":2,"type":"code","title":"Inject a pre-trend and watch the bias","skillIds":["did.event-study"],"estimatedMinutes":10,"difficulty":"applied","points":10},{"id":"did-parallel-trends-04","index":16,"moduleId":"did-parallel-trends","moduleIndex":3,"type":"interactive","title":"Dial the pre-trend violation","skillIds":["did.staggered-adoption"],"estimatedMinutes":8,"difficulty":"applied","points":10},{"id":"did-parallel-trends-05","index":17,"moduleId":"did-parallel-trends","moduleIndex":4,"type":"quiz","title":"Check","skillIds":["did.event-study"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-parallel-trends-06","index":18,"moduleId":"did-parallel-trends","moduleIndex":5,"type":"quiz","title":"Check","skillIds":["did.staggered-adoption"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-parallel-trends-07","index":19,"moduleId":"did-parallel-trends","moduleIndex":6,"type":"truefalse","title":"Big post gap, diverging pre-trends","skillIds":["did.event-study"],"estimatedMinutes":3,"difficulty":"applied","points":10},{"id":"did-parallel-trends-08","index":20,"moduleId":"did-parallel-trends","moduleIndex":7,"type":"numeric","title":"DiD from a 2×2 table","skillIds":["did.staggered-adoption"],"estimatedMinutes":5,"difficulty":"applied","points":20}]},{"id":"did-event-study","title":"4 · Event-study / dynamic DiD","summary":"Estimate a separate effect for each period relative to treatment to test pre-trends and trace the effect's dynamics.","stageCount":8,"stages":[{"id":"did-event-study-01","index":21,"moduleId":"did-event-study","moduleIndex":0,"type":"read","title":"From one number to a whole path","skillIds":["did.did-inference"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-event-study-02","index":22,"moduleId":"did-event-study","moduleIndex":1,"type":"read","title":"Reading leads and lags","skillIds":["did.did-inference"],"estimatedMinutes":6,"difficulty":"applied","points":5},{"id":"did-event-study-03","index":23,"moduleId":"did-event-study","moduleIndex":2,"type":"code","title":"Build a panel and run an event study","skillIds":["did.did-inference"],"estimatedMinutes":10,"difficulty":"applied","points":10},{"id":"did-event-study-04","index":24,"moduleId":"did-event-study","moduleIndex":3,"type":"interactive","title":"Pre-trend vs. true effect in the event-study plot","skillIds":["did.did-inference"],"estimatedMinutes":8,"difficulty":"applied","points":10},{"id":"did-event-study-05","index":25,"moduleId":"did-event-study","moduleIndex":4,"type":"quiz","title":"Check","skillIds":["did.did-inference"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-event-study-06","index":26,"moduleId":"did-event-study","moduleIndex":5,"type":"quiz","title":"Check","skillIds":["did.did-inference"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-event-study-07","index":27,"moduleId":"did-event-study","moduleIndex":6,"type":"quiz","title":"Reading a significant lead","skillIds":["did.did-inference"],"estimatedMinutes":5,"difficulty":"applied","points":15},{"id":"did-event-study-08","index":28,"moduleId":"did-event-study","moduleIndex":7,"type":"multi","title":"What the event-study plot tells you","skillIds":["did.did-inference"],"estimatedMinutes":5,"difficulty":"applied","points":20}]}]}
