ArCo: An R package to Estimate Artificial Counterfactuals

In this paper we introduce the ArCo package for R which consists of a set of functions to implement the the Artificial Counterfactual (ArCo) methodology to estimate causal effects of an intervention (treatment) on aggregated data and when a control group is not necessarily available. The ArCo method is a two-step procedure, where in the first stage a counterfactual is estimated from a large panel of time series from a pool of untreated peers. In the second-stage, the average treatment effect over the post-intervention sample is computed. Standard inferential procedures are available. The package is illustrated with both simulated and real datasets.

Yuri R. Fonseca , Ricardo P. Masini , Marcelo C. Medeiros , Gabriel F. R. Vasconcelos

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at

CRAN packages used

ArCo, boot, glmnet, Synth

CRAN Task Views implied by cited packages

Survival, Econometrics, MachineLearning, Optimization, SocialSciences, TimeSeries


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Fonseca, et al., "The R Journal: ArCo: An R package to Estimate Artificial Counterfactuals", The R Journal, 2018

BibTeX citation

  author = {Fonseca, Yuri R. and Masini, Ricardo P. and Medeiros, Marcelo C. and Vasconcelos, Gabriel F. R.},
  title = {The R Journal: ArCo: An R package to Estimate Artificial Counterfactuals},
  journal = {The R Journal},
  year = {2018},
  note = {},
  doi = {10.32614/RJ-2018-016},
  volume = {10},
  issue = {1},
  issn = {2073-4859},
  pages = {91-108}