{"@context":{"@language":"en","@vocab":"https://schema.org/","citeAs":"cr:citeAs","column":"cr:column","conformsTo":"dct:conformsTo","cr":"http://mlcommons.org/croissant/","rai":"http://mlcommons.org/croissant/RAI/","data":{"@id":"cr:data","@type":"@json"},"dataType":{"@id":"cr:dataType","@type":"@vocab"},"dct":"http://purl.org/dc/terms/","examples":{"@id":"cr:examples","@type":"@json"},"extract":"cr:extract","field":"cr:field","fileProperty":"cr:fileProperty","fileObject":"cr:fileObject","fileSet":"cr:fileSet","format":"cr:format","includes":"cr:includes","isLiveDataset":"cr:isLiveDataset","jsonPath":"cr:jsonPath","key":"cr:key","md5":"cr:md5","parentField":"cr:parentField","path":"cr:path","recordSet":"cr:recordSet","references":"cr:references","regex":"cr:regex","repeated":"cr:repeated","replace":"cr:replace","sc":"https://schema.org/","separator":"cr:separator","source":"cr:source","subField":"cr:subField","transform":"cr:transform","wd":"https://www.wikidata.org/wiki/"},"@type":"sc:Dataset","conformsTo":"http://mlcommons.org/croissant/1.0","name":"Replication Data for: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data","url":"https://doi.org/10.7910/DVN/ZVC9W5","creator":[{"@type":"Person","givenName":"Licheng","familyName":"Liu","affiliation":{"@type":"Organization","name":"Massachusetts Institute of Technology"},"sameAs":"https://orcid.org/0000-0002-9183-163X","@id":"https://orcid.org/0000-0002-9183-163X","identifier":"https://orcid.org/0000-0002-9183-163X","name":"Liu, Licheng"},{"@type":"Person","givenName":"Ye","familyName":"Wang","sameAs":"https://orcid.org/0000-0001-5127-4245","@id":"https://orcid.org/0000-0001-5127-4245","identifier":"https://orcid.org/0000-0001-5127-4245","name":"Wang, Ye"},{"@type":"Person","givenName":"Yiqing","familyName":"Xu","affiliation":{"@type":"Organization","name":"Stanford University"},"sameAs":"https://orcid.org/0000-0003-2041-6671","@id":"https://orcid.org/0000-0003-2041-6671","identifier":"https://orcid.org/0000-0003-2041-6671","name":"Xu, Yiqing"}],"description":"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.","keywords":["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"],"license":"https://dataverse.harvard.edu/api/datasets/:persistentId/versions/1.0/customlicense?persistentId=doi:10.7910/DVN/ZVC9W5","datePublished":"2022-05-02","dateModified":"2022-05-02","includedInDataCatalog":{"@type":"DataCatalog","name":"Harvard Dataverse","url":"https://dataverse.harvard.edu"},"publisher":{"@type":"Organization","name":"Harvard Dataverse"},"version":"1.0","citeAs":"@data{DVN/ZVC9W5_2022,author = {Liu, Licheng and Wang, Ye and Xu, Yiqing},publisher = {Harvard Dataverse},title = {Replication Data for: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data},year = {2022},url = {https://doi.org/10.7910/DVN/ZVC9W5}}","citation":[{"@type":"CreativeWork","name":"Liu, Licheng, Ye Wang, and Yiqing Xu. [date]. “A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data.” American Journal of Political Science Forthcoming. http://ajps.org/"}],"distribution":[{"@type":"cr:FileObject","@id":"replication/Codebook.pdf","name":"Codebook.pdf","encodingFormat":"application/pdf","md5":"e4d8a8f88ed7a811c2ff883c4b167c5c","contentSize":"137921","description":"Codebook.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6182777"},{"@type":"cr:FileObject","@id":"replication/ReadMe.pdf","name":"ReadMe.pdf","encodingFormat":"application/pdf","md5":"02973f2b1f8fd6c69450f4f516bff229","contentSize":"268852","description":"ReadMe file.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6182778"},{"@type":"cr:FileObject","@id":"replication/code/0_root.R","name":"0_root.R","encodingFormat":"type/x-r-syntax","md5":"21931e071ef219338ab025888503cde2","contentSize":"1355","description":"Execute all code files.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165621"},{"@type":"cr:FileObject","@id":"replication/code/1_ex_sim0.R","name":"1_ex_sim0.R","encodingFormat":"type/x-r-syntax","md5":"614871a1819d5b1a76b5a7b0ae1df654","contentSize":"9518","description":"Performs analysis on a simulated dataset.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165627"},{"@type":"cr:FileObject","@id":"replication/code/2_ex_HH2015.R","name":"2_ex_HH2015.R","encodingFormat":"type/x-r-syntax","md5":"a13f103916bab13abdae513d78fba841","contentSize":"3649","description":"Performs analysis on Hainmueller and Hangartner (2015).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165628"},{"@type":"cr:FileObject","@id":"replication/code/3_ex_FM2015.R","name":"3_ex_FM2015.R","encodingFormat":"type/x-r-syntax","md5":"1bf7c3b64646f5b634e22b5f49c02ccf","contentSize":"19285","description":"Performs analysis on Fouirnaies and Mutlu-Eren (2015).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165633"},{"@type":"cr:FileObject","@id":"replication/code/4_sim_tests_n100.R","name":"4_sim_tests_n100.R","encodingFormat":"type/x-r-syntax","md5":"f5ffd05b523b242012987c50afa84c55","contentSize":"3084","description":"Conducts simulations comparing the F test and the equivalence test (n = 100). ","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165641"},{"@type":"cr:FileObject","@id":"replication/code/5_sim_tests_n300.R","name":"5_sim_tests_n300.R","encodingFormat":"type/x-r-syntax","md5":"bcfa1f1ffdf9b17ffa5b12bbfa689f37","contentSize":"3021","description":"Conducts simulations comparing the F test and the equivalence test (n = 300).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165624"},{"@type":"cr:FileObject","@id":"replication/code/6_sim_ife_mc.R","name":"6_sim_ife_mc.R","encodingFormat":"type/x-r-syntax","md5":"ee6930932074a9f5a6708a3bc1cd0881","contentSize":"4414","description":"Conducts simulations comparing IFEct and MC.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165634"},{"@type":"cr:FileObject","@id":"replication/code/7_sim_inference.R","name":"7_sim_inference.R","encodingFormat":"type/x-r-syntax","md5":"123fd908ae92012449871ef715e8058e","contentSize":"5029","description":"Conduct simulations to investigate the properties of inferential methods.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165644"},{"@type":"cr:FileObject","@id":"replication/code/8_plot_sim.R","name":"8_plot_sim.R","encodingFormat":"type/x-r-syntax","md5":"e97dcfccb59cdf71d10ec9e4361e6625","contentSize":"8067","description":"Plot simulation results.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165630"},{"@type":"cr:FileObject","@id":"replication/code/simulateData.R","name":"simulateData.R","encodingFormat":"type/x-r-syntax","md5":"c52dbf62799dda8bc4943cb122038b21","contentSize":"5218","description":"Code to simulate panel data with general treatment structure.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165650"},{"@type":"cr:FileObject","@id":"replication/code/simulateDID.R","name":"simulateDID.R","encodingFormat":"type/x-r-syntax","md5":"da412b8c3a6581de089b919e5ff5d419","contentSize":"5583","description":"Code to simulate panel data with DID or staggered adoption treatment.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165653"},{"@type":"cr:FileObject","@id":"replication/data/fm2015.dta","name":"fm2015.dta","encodingFormat":"application/x-stata-14","md5":"a9344660f021b28a31d38be4aa7ccf00","contentSize":"185756","description":"Data file for Fouirnaies and Mutlu-Eren (2015).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165625?format=original"},{"@type":"cr:FileObject","@id":"replication/data/hh2015.dta","name":"hh2015.dta","encodingFormat":"application/x-stata-14","md5":"5ffb16a76d9247ddd21eb924ad9d5a84","contentSize":"413715","description":"Data file for Hainmueller and Hangartner (2015).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165649?format=original"},{"@type":"cr:FileObject","@id":"replication/graph/zzz.txt","name":"zzz.txt","encodingFormat":"text/plain","md5":"d41d8cd98f00b204e9800998ecf8427e","contentSize":"0","description":"","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6182755"},{"@type":"cr:FileObject","@id":"replication/log/log_fm2015.txt","name":"log_fm2015.txt","encodingFormat":"text/plain","md5":"737642cde4cbe15498500ec10be6462a","contentSize":"15537","description":"Log file for &ldquo;3_ex_FM2015.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165645"},{"@type":"cr:FileObject","@id":"replication/log/log_hh2015.txt","name":"log_hh2015.txt","encodingFormat":"text/plain","md5":"0c88921f119de60a152c27f9df43fb58","contentSize":"4173","description":"Log file for &ldquo;2_ex_HH2015.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165623"},{"@type":"cr:FileObject","@id":"replication/log/log_inference.txt","name":"log_inference.txt","encodingFormat":"text/plain","md5":"2fa89477b4d39b1477a275678036ecb8","contentSize":"112","description":"Log file for &ldquo;7_sim_inference.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165646"},{"@type":"cr:FileObject","@id":"replication/log/log_simdata.txt","name":"log_simdata.txt","encodingFormat":"text/plain","md5":"91c7303a1f8ee06e67d357b9e8835626","contentSize":"8428","description":"Log file for &ldquo;1_ex_sim0.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165643"},{"@type":"cr:FileObject","@id":"replication/log/log_sim_ife_mc.txt","name":"log_sim_ife_mc.txt","encodingFormat":"text/plain","md5":"2df04965901ce90657fd01f8d5334870","contentSize":"937","description":"Log file for &ldquo;6_sim_ife_mc.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165638"},{"@type":"cr:FileObject","@id":"replication/log/log_sim_tests_n100.txt","name":"log_sim_tests_n100.txt","encodingFormat":"text/plain","md5":"85935f4297ce0a42a6dbd448f90230cd","contentSize":"660","description":"Log file for &ldquo;4_sim_tests_n100.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165632"},{"@type":"cr:FileObject","@id":"replication/log/log_sim_tests_n300.txt","name":"log_sim_tests_n300.txt","encodingFormat":"text/plain","md5":"f32e4996900496d3e69058ced51ff397","contentSize":"672","description":"Log file for &ldquo;5_sim_tests_n300.R&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165622"},{"@type":"cr:FileObject","@id":"replication/packages/fastplm_1.0.8.tar.gz","name":"fastplm_1.0.8.tar.gz","encodingFormat":"application/gzip","md5":"96b5d8b2ac4b5d36f0f24217f5dfabc2","contentSize":"1818360","description":"Source file for R package &ldquo;fastplm&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165647"},{"@type":"cr:FileObject","@id":"replication/packages/fect_0.4.1.tar.gz","name":"fect_0.4.1.tar.gz","encodingFormat":"application/gzip","md5":"3bfcb1df5057257053e7252e1e27b53e","contentSize":"506086","description":"Source file for R package &ldquo;fect&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165639"},{"@type":"cr:FileObject","@id":"replication/packages/panelView_1.1.9.tar.gz","name":"panelView_1.1.9.tar.gz","encodingFormat":"application/gzip","md5":"856b3066a41413ee442b35a1d941fc3a","contentSize":"116133","description":"Source file for R package &ldquo;panelView&rdquo;.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165626"},{"@type":"cr:FileObject","@id":"replication/results/ex_FM2015.RData","name":"ex_FM2015.RData","encodingFormat":"application/x-rlang-transport","md5":"4a27cd48f960b7c3410d6d921b0cd986","contentSize":"26583510","description":"Stored results for Fouirnaies and Mutlu-Eren (2015).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165635"},{"@type":"cr:FileObject","@id":"replication/results/ex_HH2015.RData","name":"ex_HH2015.RData","encodingFormat":"application/x-rlang-transport","md5":"2306b9287f1993c7c7caccabc233956f","contentSize":"4646569","description":"Stored results for Hainmueller and Hangartner (2015).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165652"},{"@type":"cr:FileObject","@id":"replication/results/qqplots_N100.RData","name":"qqplots_N100.RData","encodingFormat":"application/x-rlang-transport","md5":"9af9b8d74e704043b02f3dda2f7a4639","contentSize":"23186","description":"Stored results for the QQ plot (N = 100).","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165637"},{"@type":"cr:FileObject","@id":"replication/results/qqplots_N50.RData","name":"qqplots_N50.RData","encodingFormat":"application/x-rlang-transport","md5":"fe90d41edb723d4399b8c4903006b26f","contentSize":"23154","description":"Stored results for the QQ plot (N = 50). ","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165642"},{"@type":"cr:FileObject","@id":"replication/results/simexample.RData","name":"simexample.RData","encodingFormat":"application/x-rlang-transport","md5":"2505ec324a3cda08e149e38987c575ef","contentSize":"14684436","description":"Stored results for the simulated example.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165640"},{"@type":"cr:FileObject","@id":"replication/results/sim_ife_mc.RData","name":"sim_ife_mc.RData","encodingFormat":"application/x-rlang-transport","md5":"d2772d20997fee5dd8e06adf73e04c45","contentSize":"230600","description":"Stored results for the IFE/MC comparison.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165631"},{"@type":"cr:FileObject","@id":"replication/results/sim_tests_n100.RData","name":"sim_tests_n100.RData","encodingFormat":"application/x-rlang-transport","md5":"b63f02a4f05d74c5defb3775a486c1ba","contentSize":"323610","description":"Stored results for the F/equivalence test comparison (N = 100)","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165629"},{"@type":"cr:FileObject","@id":"replication/results/sim_tests_n300.RData","name":"sim_tests_n300.RData","encodingFormat":"application/x-rlang-transport","md5":"04262062533d46b1408b90b72f7f11b4","contentSize":"320453","description":"Stored results for the simulated example.","contentUrl":"https://dataverse.harvard.edu/api/access/datafile/6165636"}],"recordSet":[{"@type":"cr:RecordSet","field":[{"@type":"cr:Field","name":"councilnumber","description":"group(assembly_name type)","dataType":"sc:Float","source":{"@id":"27582194","fileObject":{"@id":"replication/data/fm2015.dta"},"extract":{"column":"councilnumber"}}},{"@type":"cr:Field","name":"year","description":"year","dataType":"sc:Integer","source":{"@id":"27582190","fileObject":{"@id":"replication/data/fm2015.dta"},"extract":{"column":"year"}}},{"@type":"cr:Field","name":"logSgwaPercap","description":"","dataType":"sc:Float","source":{"@id":"27582191","fileObject":{"@id":"replication/data/fm2015.dta"},"extract":{"column":"logSgwaPercap"}}},{"@type":"cr:Field","name":"treat","description":"","dataType":"sc:Float","source":{"@id":"27582195","fileObject":{"@id":"replication/data/fm2015.dta"},"extract":{"column":"treat"}}},{"@type":"cr:Field","name":"first_treat","description":"","dataType":"sc:Float","source":{"@id":"27582192","fileObject":{"@id":"replication/data/fm2015.dta"},"extract":{"column":"first_treat"}}},{"@type":"cr:Field","name":"cohort","description":"","dataType":"sc:Float","source":{"@id":"27582193","fileObject":{"@id":"replication/data/fm2015.dta"},"extract":{"column":"cohort"}}}]},{"@type":"cr:RecordSet","field":[{"@type":"cr:Field","name":"bfs","description":"Municipality BFS code","dataType":"sc:Float","source":{"@id":"27582198","fileObject":{"@id":"replication/data/hh2015.dta"},"extract":{"column":"bfs"}}},{"@type":"cr:Field","name":"year","description":"","dataType":"sc:Float","source":{"@id":"27582197","fileObject":{"@id":"replication/data/hh2015.dta"},"extract":{"column":"year"}}},{"@type":"cr:Field","name":"nat_rate_ord","description":"","dataType":"sc:Float","source":{"@id":"27582199","fileObject":{"@id":"replication/data/hh2015.dta"},"extract":{"column":"nat_rate_ord"}}},{"@type":"cr:Field","name":"indirect","description":"","dataType":"sc:Float","source":{"@id":"27582196","fileObject":{"@id":"replication/data/hh2015.dta"},"extract":{"column":"indirect"}}}]}]}