Description Usage Arguments Value
Format "long" panel data into "wide" matrices to fit synthetic controls
1 2 3 | format_data(outcomes, metadata, trt_unit = 1, outcome_col = NULL,
cols = list(unit = "unit", time = "time", outcome = "outcome", treated =
"treated"))
|
outcomes |
Tidy dataframe with the outcomes and meta data |
metadata |
Dataframe of metadata |
trt_unit |
Unit that is treated (target for regression), default: 1 |
outcome_col |
Column name which identifies outcomes, if NULL then only one outcome is assumed |
cols |
Column names corresponding to the units, time variable, outcome, and treated indicator |
List of data to use as an argument for Synth::synth, whether the unit was actually treated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.