Replication Data for: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data (doi:10.7910/DVN/ZVC9W5)

View:

Part 1: Document Description
Part 2: Study Description
Part 3: Data Files Description
Part 4: Variable Description
Part 5: Other Study-Related Materials
Entire Codebook

Document Description

Citation

Title:

Replication Data for: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data

Identification Number:

doi:10.7910/DVN/ZVC9W5

Distributor:

Harvard Dataverse

Date of Distribution:

2022-05-02

Version:

1

Bibliographic Citation:

Liu, Licheng; Wang, Ye; Xu, Yiqing, 2022, "Replication Data for: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data", https://doi.org/10.7910/DVN/ZVC9W5, Harvard Dataverse, V1, UNF:6:gJRdTz84oqmez8xIYKyPUA== [fileUNF]

Study Description

Citation

Title:

Replication Data for: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data

Identification Number:

doi:10.7910/DVN/ZVC9W5

Authoring Entity:

Liu, Licheng (Massachusetts Institute of Technology)

Wang, Ye (Massachusetts Institute of Technology)

Xu, Yiqing (Stanford University)

Producer:

Xu, Yiqing

Distributor:

Harvard Dataverse

Access Authority:

Xu, Yiqing

Depositor:

Xu, Yiqing

Date of Deposit:

2022-03-02

Holdings Information:

https://doi.org/10.7910/DVN/ZVC9W5

Study Scope

Keywords:

Social Sciences, Social Sciences, Imputation methods, Counterfactual estimators, Twoway fixed effects, Parallel trends, Interactive fixed effects, Matrix completion, Equivalence tests, Placebo tests, Time-series cross-sectional data, Panel data

Abstract:

This paper introduces a simple framework of counterfactual estimation for causal inference with time-series cross-sectional data, in which we estimate the average treatment effect on the treated by directly imputing counterfactual outcomes for treated observations. We discuss several novel estimators under this framework, including the fixed effects counterfactual estimator, interactive fixed effects counterfactual estimator, and matrix completion estimator. They provide more reliable causal estimates than conventional twoway fixed effects models when treatment effects are heterogeneous or unobserved time-varying confounders exist. Moreover, we propose a new dynamic treatment effects plot, along with several diagnostic tests, to help researchers gauge the validity of the identifying assumptions. We illustrate these methods with two political economy examples and develop an open-source package, fect, in both R and Stata to facilitate implementation.

Notes:

This dataset underwent an independent verification process that replicated the tables and figures in the primary article. For the supplementary materials, verification was performed solely for the successful execution of code. The verification process was carried out by the Odum Institute for Research in Social Science at the University of North Carolina at Chapel Hill. <br></br> The associated article has been awarded Open Materials and Open Data Badges. Learn more about the Open Practice Badges from the <a href="https://osf.io/tvyxz/wiki/home/" target="_blank">Center for Open Science</a>.<br></br> <img src="https://odum.unc.edu/files/2020/03/OpenData_PR-1.png" alt="Open Data Badge" height="77" width="80"> <img src="https://odum.unc.edu/files/2020/03/OpenMaterials_PR-1.png" alt="Open Materials Badge" height="77" width="80">

Methodology and Processing

Sources Statement

Data Sources:

Hainmueller, Jens and Dominik Hangartner. 2015. “Does Direct Democracy Hurt Immigrant Minorities? Evidence from Naturalization Decisions in Switzerland.” American Journal of Political Science 63(33): pp. 14–38.

<br></br> Fouirnaies, Alexander and Hande Mutlu-Eren. 2015. “English Bacon: Copartisan Bias in Intergovernmental Grant Allocation in England.” The Journal of Politics 77(3):805–817.

Data Access

Disclaimer:

The <i>American Journal of Political Science</i> and the Odum Institute for Research in Social Science are not responsible for the accuracy or quality of data uploaded within the <i>AJPS</i> Dataverse, for the use of those data, or for interpretations or conclusions based on their use.

Notes:

This dataset is made available with limited information on how it can be used. You may wish to communicate with the Contact(s) specified before use.

Other Study Description Materials

Related Publications

Citation

Bibliographic Citation:

Liu, Licheng, Ye Wang, and Yiqing Xu. [date]. “A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data.” <i>American Journal of Political Science</i> Forthcoming. <a href="http://ajps.org/" target="_blank">http://ajps.org/</a>

File Description--f6165625

File: fm2015.tab

  • Number of cases: 8059

  • No. of variables per record: 6

  • Type of File: text/tab-separated-values

Notes:

UNF:6:IvMmibETutwUCmTsaMjSEw==

File Description--f6165649

File: hh2015.tab

  • Number of cases: 25431

  • No. of variables per record: 4

  • Type of File: text/tab-separated-values

Notes:

UNF:6:NH5HjUjeLXrV6y/B92dM6g==

Variable Description

List of Variables:

Variables

group(assembly_name type)

f6165625 Location:

Summary Statistics: Mean 234.90197294949175; Max. 466.0; StDev 133.7637004015898; Min. 1.0; Valid 8059.0

Variable Format: numeric

Notes: UNF:6:347MxyPjxAafKU5FrDMhcw==

year

f6165625 Location:

Summary Statistics: Min. 1992.0; Mean 2001.778632584688; Valid 8059.0; StDev 6.0233174007919175; Max. 2012.0

Variable Format: numeric

Notes: UNF:6:aIM4PVCAm6wB1ZAqkqq4WA==

logSgwaPercap

f6165625 Location:

Summary Statistics: StDev 2.070203110908401; Mean 2.740338865728027; Valid 7993.0; Max. 7.73755407333374; Min. -2.42921781539917;

Variable Format: numeric

Notes: UNF:6:VKlrWeJy+PFyQwpxbBcLog==

treat

f6165625 Location:

Summary Statistics: Min. 0.0; StDev 0.44696752571922876; Max. 1.0; Valid 7758.0; Mean 0.2758442897654041;

Variable Format: numeric

Notes: UNF:6:xjIFJRORO3TG1rZ+Vt2TQw==

first_treat

f6165625 Location:

Summary Statistics: Valid 6909.0; StDev 6.91163178368417; Min. 1992.0; Max. 2011.0; Mean 1998.7595889419597;

Variable Format: numeric

Notes: UNF:6:mo0jMviOBKH4JUPWVJkv2Q==

cohort

f6165625 Location:

Summary Statistics: Valid 8059.0; Mean 1.6597592753443324; StDev 0.9632783497390438; Max. 3.0; Min. 0.0;

Variable Format: numeric

Notes: UNF:6:l2epoanM/cmo1+ZSTGFcaQ==

Municipality BFS code

f6165649 Location:

Summary Statistics: Max. 6800.0; StDev 2145.77464075097; Min. 1.0; Mean 3183.132122212093; Valid 25431.0;

Variable Format: numeric

Notes: UNF:6:2LtYJIUUSEA9NoqX641uzw==

year

f6165649 Location:

Summary Statistics: Min. 1990.0; Valid 25431.0; StDev 6.055419765237458; Mean 2000.0; Max. 2010.0;

Variable Format: numeric

Notes: UNF:6:IeHtOs26nNk1k/x2XtP0Kw==

nat_rate_ord

f6165649 Location:

Summary Statistics: StDev 4.569704530193323; Valid 23009.0; Max. 46.66666793823242; Mean 2.469583367716359; Min. 0.0;

Variable Format: numeric

Notes: UNF:6:9knNCQVeRiE+/0729Cd4+A==

indirect

f6165649 Location:

Summary Statistics: Valid 25431.0; StDev 0.47761905223195444; Min. 0.0; Mean 0.35205064684834164; Max. 1.0

Variable Format: numeric

Notes: UNF:6:hab33J/GI3zA36uGX8tvRQ==

Other Study-Related Materials

Label:

0_root.R

Text:

Execute all code files.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

1_ex_sim0.R

Text:

Performs analysis on a simulated dataset.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

2_ex_HH2015.R

Text:

Performs analysis on Hainmueller and Hangartner (2015).

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

3_ex_FM2015.R

Text:

Performs analysis on Fouirnaies and Mutlu-Eren (2015).

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

4_sim_tests_n100.R

Text:

Conducts simulations comparing the F test and the equivalence test (n = 100).

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

5_sim_tests_n300.R

Text:

Conducts simulations comparing the F test and the equivalence test (n = 300).

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

6_sim_ife_mc.R

Text:

Conducts simulations comparing IFEct and MC.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

7_sim_inference.R

Text:

Conduct simulations to investigate the properties of inferential methods.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

8_plot_sim.R

Text:

Plot simulation results.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

Codebook.pdf

Text:

Codebook.

Notes:

application/pdf

Other Study-Related Materials

Label:

ex_FM2015.RData

Text:

Stored results for Fouirnaies and Mutlu-Eren (2015).

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

ex_HH2015.RData

Text:

Stored results for Hainmueller and Hangartner (2015).

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

fastplm_1.0.8.tar.gz

Text:

Source file for R package “fastplm”.

Notes:

application/gzip

Other Study-Related Materials

Label:

fect_0.4.1.tar.gz

Text:

Source file for R package “fect”.

Notes:

application/gzip

Other Study-Related Materials

Label:

log_fm2015.txt

Text:

Log file for “3_ex_FM2015.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

log_hh2015.txt

Text:

Log file for “2_ex_HH2015.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

log_inference.txt

Text:

Log file for “7_sim_inference.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

log_simdata.txt

Text:

Log file for “1_ex_sim0.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

log_sim_ife_mc.txt

Text:

Log file for “6_sim_ife_mc.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

log_sim_tests_n100.txt

Text:

Log file for “4_sim_tests_n100.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

log_sim_tests_n300.txt

Text:

Log file for “5_sim_tests_n300.R”.

Notes:

text/plain

Other Study-Related Materials

Label:

panelView_1.1.9.tar.gz

Text:

Source file for R package “panelView”.

Notes:

application/gzip

Other Study-Related Materials

Label:

qqplots_N100.RData

Text:

Stored results for the QQ plot (N = 100).

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

qqplots_N50.RData

Text:

Stored results for the QQ plot (N = 50).

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

ReadMe.pdf

Text:

ReadMe file.

Notes:

application/pdf

Other Study-Related Materials

Label:

simexample.RData

Text:

Stored results for the simulated example.

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

sim_ife_mc.RData

Text:

Stored results for the IFE/MC comparison.

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

sim_tests_n100.RData

Text:

Stored results for the F/equivalence test comparison (N = 100)

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

sim_tests_n300.RData

Text:

Stored results for the simulated example.

Notes:

application/x-rlang-transport

Other Study-Related Materials

Label:

simulateData.R

Text:

Code to simulate panel data with general treatment structure.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

simulateDID.R

Text:

Code to simulate panel data with DID or staggered adoption treatment.

Notes:

type/x-r-syntax

Other Study-Related Materials

Label:

zzz.txt

Notes:

text/plain