[PDF] Difference-in-differences 1 mars 2018 Regression Discontinuity. •





Previous PDF Next PDF



Difference-in-Differences in Stata 17

16 juin 2021 Two-way fixed effects also known as generalized DID (default). Allows 2x2 design. Provides a wide range of standard errors.



Differences-in-Differences

Difference in differences (DID) The coefficient for 'did' is the differences-in-differences estimator. ... The command diff is user-defined for Stata.



Differences-in-Differences (using Stata)

Differences-in-Differences. (using Stata) Difference in differences (DID) ... The coefficient for 'did' is the differences-in-differences estimator.



Simplifying the estimation of difference in differences treatment

22 janv. 2013 Propensity Score (Heckman et al. 1997



Diff: Simplifying the Estimation of Difference-in-differences

12 mars 2014 Although the latest version of Stata is equipped with the command teffects which estimates the treatment effects on a cross-sectional basis



Difference-in-differences

1 mars 2018 Regression Discontinuity. • Today we'll focus on difference-in-differences. – Reminder on basic concepts/theory. – Applications in Stata.



Bacon decomposition for understanding differences-in-differences

differences-in-differences with variation in treatment timing. July 11 2019. Stata Conference. Andrew Goodman-Bacon (Vanderbilt University).



csdid: Difference-in-Differences with Multiple Time Periods in Stata

Today's talk is all about how to implement it with our Stata command csdid. 5. Page 9. Framework and Assumptions. Page 10 



Stata Tutorial

Do-files are ASCII files that contain of Stata commands to run specific procedures. used to indicate a significant difference (some use ±3).



Module 2.5: Difference-in-Differences Designs

? Nous ne reproduirons qu'une partie du code STATA ci-dessous ; veuillez vous référer au fichier DO pour le code complet et les notes accompagnées. ? Ouvrez le jeu de données et



Title statacom didregress — Difference-in-differences estimation

These two differences give theDIDmethod its name and highlight its intuitive appeal More appealing is the fact that you can get the effect of interest theATET from one parameter in a linear regression Below we illustrate how to use didregress and xtdidregress For more information about the methods used below see[TE]DID intro



(v 33) - Princeton University

This document shows how to perform difference-in-differences regression in the following two situations: Event happened at the same time for all treated groups Event is staggered across groups Event happens at the same time for all treated groups Data preparation The before/after variable Create an indicator variable where:



Introduction to Difference in Differences (DID) Analysis

• Difference-in-Differences (DID) analysis is a useful statistic technique that analyzes data from a nonequivalence control group design and makes a casual inference about an independent variable (e g an event treatment or policy) on an outcome variable • The analytic concept of DID is very easy to comprehended within the framework



Diff: simplifying the causal inference analysis with - Stata

Difference in differences Quantile Kernel PSM Diff-in-diff diff fte t(treated) p(t) qdid(0 50) cov(bk kfc roys) kernel id(id) *** KERNEL PROPENSITY SCORE MATCHING QUANTILE DIFFERENCE-IN-DIFFERENCES *** Number of observations: 801 Baseline Follow-up Control: 78 77 155 Treated: 326 320 646



Searches related to difference in difference stata tutorial PDF

differencesestimator(‘did’inthepreviousexample) Theeffect is significantat10 withthetreatmenthavinganegativeeffect 4 The ssc Type singthecommanddiff commanddiffisuser?definedforStata Toinstalltype Dummies for treatmentand time seepreviousslide installdiff diffyt(treated)p(time)NumberofobservationsintheDIFF-IN-DIFF:70 BaselineFollow-up

Does Stata work in Windows?

A separate manual (Graphics) is devoted to the topic only. Since STATA works in a Windows format, it allows you to cut and paste the data into other Windows-based program, such as Word or WordPerfect. Finally, there is a warning about the limitations of this tutorial.

How do you transform variables in Stata?

In STATA you transform variables by using the “gen” (as in generate) command. For example, Chapter 8 of the Stock/Watson textbook introduces the polynomial regression model, logarithms, and interactions between variables. Let us reproduce Equations (8.2), (8.11), (8.18), and (8.37) here. The following commands generate the necessary variables2:

How do I order Stata?

Perhaps the most useful of these are the User’s Guide and the Base Reference Manuals. You can order STATA by calling (800) 782-8272 or writing to service@stata-press.com. In addition, if you purchase the Student Version, you can acquire STATA at a steep discount.

What does VCE do in Stata?

The command vce asks STATA to print out the estimated variances and covariances of the estimated regression coefficients. The command gets STATA to carry out the joint test that the coefficients on str and expn_stu are both equal to zero. 2) The second new command is in the analysis of Table 7.1 on page 224 of Stock and Watson (2018).

3/1/181Photo Credit Goes Here

IAPRI-MSU Technical Training

Difference-in-differences

1March2018IndabaAgriculturalPolicyResearchInstituteLusaka,ZambiaRecall from July/September trainings on introduction to impact evaluation (1)

3/1/182

Recall from July/September trainings on introduction to impact evaluation (2)

• Wedidabriefoverviewofcommonmethodsofimpactevaluation(IE)• Randomizedevaluation• PropensityScoreMatching• Difference-in-Differences• InstrumentalVariables• RegressionDiscontinuity

• Todaywe'llfocusondifference-in-differences- Reminderonbasicconcepts/theory- ApplicationsinStata

Learning objectives

• Bytheendoftoday'ssession,youshouldbeableto:

1. UnderstandthekeyassumptionofDIDmodels2. WritedowntheregressionequationforaDID

model

3. Identifywhichparameterintheregression

4. EstimateaDIDmodelinStataandinterpretthe

results

3/1/183

References

• Khandker,S.R.,Koolwal,G.B.andSamad,H.A.,2010.

Othersuggestedreadingsandreferences-DIDsectionsin:• Angrist,J.D.,&Pischke,J.S.(2009).Mostlyharmless

• Angrist,J.D.,&Pischke,J.S.(2015).Mastering'metrics:The • Imbens,G.W.,&Wooldridge,J.(2007).What'snewin • Ravallion,M.(2008).Evaluatinganti-povertyprograms.

REVIEW: With vs. Without • ThekeycomparisonwewanttomakeinIEisbetweenoutcomesWITHVS.WITHOUTtheintervention(project/program/policy)

• Impact="With"outcome-"without"outcome

3/1/184

Impact=With-Without

Source:Khandkeretal.(2010)

Participants'incomeWITHtheprogram?• Y

4 Participants'incomeWITHOUTtheprogram(counterfactualincome)?• Y 2

Programimpact?• Y

4 -Y 2

Introducing Difference-in-Differences (DID)

• WhohasusedDIDbeforeandwhatwereyoustudying? • WhatistheDIDapproachtoconstructingacomparisongroup/ - "TheDIDestimatorreliesonacomparisonofparticipantsand - DIDImpact=(avg.ΔYparticipants)-(avg.ΔYnon-participants) • (avg.Y T after-avg.Y T before)-(avg.Y c after-avg.Y c before)• àwhyit'scalleddifference-in-differencesordoubledifference

3/1/185

DID - visual representation

DIDimpact=(avg.Y

T after-avg.Y T before)-(avg.Y c after-avg.Y c before)

Source:Khandkeretal.(2010)

Changeinparticipants'income?• Y

4 -Y 0

Changeinnon-participants'(control)income?• Y

3 -Y 1

DIDimpact?• (Y

4 -Y 0 )-(Y 3 -Y 1

DID key assumption: parallel (common) trends

Paralleltrends="unobservedcharacteristicsaffectingprogramparticipationdonotvaryovertimewithtreatmentstatus"(Khandkeretal.2010,p.73)• I.e.,trendsintheoutcomevariablewouldbethesameinthetwogroupswithouttreatment(Angrist&Pischke2009);or• "...treatmentandcontroloutcomesmoveinparallelintheabsenceoftreatments"(Angrist&Pischke(2015,p.178)• Implies(Y

1 -Y 0 )=(Y 3 -Y 2

Source:Khandkeretal.(2010)

Changeinparticipants'income(after-before)?• Y 4 -Y 0 Changeinnon-participants'(control)income(after-before)?• Y 3 -Y 1

DIDimpact?• (Y

4 -Y 0 )-(Y 3 -Y 1 )• =Y 4 -Y 0 -Y 3 +Y 1 =Y 4 -Y 3 +Y 1 -Y 0

Substitutein(Y

1 -Y 0 )=(Y 3 -Y 2 )(paralleltrendassumption):• =Y 4 -Y 3 +Y 3 -Y 2 =Y 4 -Y 2

Sameaswithvs.without!

3/1/186

What happens if trends are not parallel?

• DIDestimateisbiased • àSeenext2slidesandhandoutbasedonfiguresin

Ravallion(2008)forillustration

KeyassumptionforDID:Paralleltrends

Source: Ravallion (2008)

Selection bias Same

DID estimate = Treatment effect

Treatment effect

Parallel

3/1/187

Selection bias

Source: Ravallion (2008)

Different

Non-paralleltrendscauseDIDtobebiased

Treatment effect

DID estimate

Treatment effect

(here DID estimate < Treatment effect )

NOTparallel

Can partially test for parallel trends if have multiple pre-treatment waves of data

• Use3wavesofdata:- 2wavespriortoimplementationofNAAIAP(2004&2007TAPRAsurveys)- 1waveafter(during)implementation(2010TAPRAsurvey)• Regresschangeinoutcomevariable(2007minus2004)ondummyforifHH

• Whilenoguaranteethattrendswouldhavebeenparallel2007to2010in

3/1/188

DID simple numerical example

Source:Khandkeretal.(2010)

DIDimpact=(avg.Y

T after-avg.Y T before)-(avg.Y c after-avg.Y c before)

DID data requirements

• Repeatedcross-sections - Separaterandomsamplesfromtherelevant OR• Paneldata- Randomsamplefromtherelevantpopulationand

3/1/189

Regression DID - Basic Setup

Y it =α+γTreated i +λAfter t +δ(Treated i

×After

t it

Where:• iindexesthecross-sectionalunitandtindexestime• Treated=1ifunitisultimatelytreated(exposedtoproject/program/policychange),

• After=1iftimeperiodisaftertheproject/program/policychange,

• Treated×Afteristheinteractionofthesetwovariables• *Note:Notationaboveisforwhen"treatment"ortheproject/program/policychange

• Whichparameterrepresentsthecausaleffectofinterest(assumingthekey Regression DID - Basic Setup - with higher level project/program/policy change Y idt =α+γTreated d +λAfter t +δ(Treated d

×After

t idt • Whichparameterrepresentsthecausaleffectofinterest(assumingthe keyassumptionshold)?

• ThisisthemorecommoninstanceinwhichDIDisused• Wouldwanttoclusteryourstandarderrorsatthedistrictlevel

δ(theparameterontheTreatedXAfterterm)

3/1/1810

Regression DID - Basic Setup - with covariates

Canalsocontrolforadditionalcovariates:

Y idt =α+γTreated d +λAfter t +δ(Treated d

×After

t )+X idt idt • Boldrepresentsvectors• Whichparameterrepresentsthecausaleffectofinterest(assumingthe keyassumptionshold)?

δ(theparameterontheTreatedXAfterterm)

EX)2periods:

Y it =α+λAfter t +δTreated it +c i +u it • Firstdifferencetoremovec i (orestimateviaFE)ΔY i =λ+δΔTreated i +Δu i • Whichparameteristhecausaleffectofinterest (assumingthekeyassumptionshold)?

Panel FE setup without control variables

3/1/1811

EX)2ormoreperiods

Y it =α+Year t

λ+δTreated

it +X it

β+c

i +u it • WhereYearisavectorofyeardummies• EstimateviaFE • Whichparameteristhecausaleffectofinterest (assumingthekeyassumptionshold)?

Panel FE setup with control variables

Examples & tweaking the variable names/notation to fit your particular situation (1)

General:Y

it =α+γTreated i +λAfter t +δ(Treated i

×After

t valuesinacityinMassachusetts

• Newgarbageincineratorconstructionbeganin1981• Havehousingvaluedatafrom1978and1981plusinfoondistancefromhouse

• Let"nearinc"=1ifhouseisnear(within3miles/4.83km)incinerator,=0o.w. (farfromincinerator)

• Let"y81"=1ifyearis1981,and=0o.w.(yearis1978)• HowwouldyouwritetheDIDregressionequationinthiscase?Whatisthekey

parameterofinterest?

3/1/1812

Examples & tweaking the variable names/notation to fit your particular situation (1)

General:Y

it =α+γTreated i +λAfter t +δ(Treated i

×After

t valuesinacityinMassachusetts

Specific:rprice

it =α+γnearinc i +λy81 t +δ(nearinc i

×y81

t it

• Where- "rprice"isthehomevalueinrealUS$- "nearinc"=1ifhouseisnear(within3miles/4.83km)incinerator,=0o.w.

(farfromincinerator) - "y81"=1ifyearis1981,and=0o.w.(yearis1978) Examples & tweaking the variable names/notation to fit your particular situation (2)

General:Y

it =α+γTreated i +λAfter t +δ(Treated i

×After

t it

Example:Angrist&Pischke(2009)-understandingcholeratransmissioninmid-1800s• Havedistrict-leveldatafromLondonondeathratesandwatercompanyin1849&

1852.Let:

- "deathr"bethedeathrateindistrictd- "Lambeth"=1ifdistrictdgetsitswaterfromtheLambethCompany(which

- "y1852"=1ifyearis1852,and=0o.w.(yearis1849)• WritedowntheDIDequationforthisscenarioandusingthesevariablesSpecific:deathr

dt =α+γLambeth d +λy1852 t +δ(Lambeth d

×y1852

t dt

3/1/1813

Examples & tweaking the variable names/notation to fit your particular situation (3)

General:Y

idt =α+γTreated d +λAfter t +δ(Treated d

×After

t idt

Example:Angrist&Pischke(2009)-effectofémin.wageonfastfoodemployment• Havedatafromneighboringstates(NJ&PA).Bothstateshave$4.25minimumwagein

- "employ"betheemploymentlevelofeachrestaurant- "NJ"=1ifstateisNJ,=0ifstateisPA- "Nov92"=1iftimeisNovember1992,and=0o.w.(timeisFebruary1992)• WritedowntheDIDequationforthisscenarioandusingthesevariables.Thinkcarefully

aboutwhichsubscriptstoputoneachvariable.

Specific:employ

ist =α+γNJ s +λNov92 t +δ(NJ s

×Nov92

t ist

DID good to consider if have natural experiment

• Bigpicturequestion:whydomanyHHsselllow,buyhigh(w.r.t.cropprices)?• Hypothesis:"short-termexpenditureneedsforcepoorhouseholdstosell

• Naturalexperiment:Malawichangedprimaryschoolcalendar- 2009:startinDecember.2010:startinSeptember.à HHshavetomakeschool-relatedexpendituresmuchearlierin2010than

3/1/1814

DID & natural experiment example (cont'd)

DIDregression:General:Y

it =α+γTreated i +λAfter t +δ(Treated i

×After

t it

Specific:Cropsales

it =α+γChildren i +λy2010 t +δ(Children i

×y2010

t it

Where• Cropsales=cumulativevalueofHHcropsalesthroughAugustofyeart• Children=#ofchildreninprimaryschool(0,1,2,3,etc.).Orcoulddo0/1• y2010=1ifyearis2010;=0ifyearis2009• EstimateseparatelyforHHsabovevs.belowthepovertyline

What other situations/examples appropriate for DID can you think of? • AndhowwouldyousetupyourDIDregressionequation? • General:Y=α+γTreated+λAfter+δ(Treated×After)+ε

3/1/1815

DID vs. other methods

• KeydifferencebetweenPSMandDID:PSMassumesselectiononobservablesonly,DIDallowsselectiontobeafunctionoftime-constantunobservedfactors(a.k.a.timeinvariantunobservedheterogeneity)

- Wherehaveyouheardthistermbefore?- Whatifselectionisafunctionoftime-varyingunobservables? • Anotherkeydifference: - Randomizedevaluations&PSM-cross-sectionaldata - NeedrepeatedcrosssectionsorpaneldataforDID

ParaphrasedfromKhandkeretal.(2010)

Theory wrap-up

(Source: Angrist & Pischke 2015, pp. 203-204) "MasterStevefu:Wrapitupforme,Grasshopper.

3/1/1816

In Stata - DID (panel or pooled cross-sections)

General:Y

it =α+γTreated i +λAfter t +δ(Treated i

×After

t it istime-constant) interest(assumingthekeyassumptionshold)? • Theoneonthei.Treated#i.AftervariableIn Stata - FE (panel data)

General:Y

it =α+λAfter t +δTreated it +c i +u it varying) interest(assumingthekeyassumptionshold)? • Theoneonthei.Treatedvariable

3/1/1817

Stata exercises

1. Wooldridge(2002)newgarbageincinerator&housingvalues

a. UseKIELMC.DTAin"data"foldertoestimate: rprice it =α+γnearinc i +λy81 t +δ(nearinc i

×y81

t it b. Interpretthekeycoefficientofinterest

Stata exercises

a. Usehh_9198.dtain"data/Khandkeretal2010datafiles" foldertoestimate:lexptot it =α+γdfmfd98 iquotesdbs_dbs35.pdfusesText_40
[PDF] haptoglobine basse causes

[PDF] hyperplaquettose causes

[PDF] myélémie causes

[PDF] cours de lobbying pdf

[PDF] exemple de lobbying

[PDF] quels types d'échanges la balance des paiements permet-elle de mesurer ?

[PDF] pédagogie différenciée l école primaire

[PDF] pédagogie différenciée exemple concret

[PDF] les cinq aveugles et léléphant

[PDF] le loup et le chien question reponse

[PDF] histoire du chien frisé et de la lettre jaune

[PDF] le loup et le chien cycle 3

[PDF] le loup et le chien texte pdf

[PDF] questionnaire un martien friot

[PDF] electric counterpoint