format_data: Format "long" panel data into "wide" matrices to fit...

Description Usage Arguments Value

Description

Format "long" panel data into "wide" matrices to fit synthetic controls

Usage

1
2
3
format_data(outcomes, metadata, trt_unit = 1, outcome_col = NULL,
  cols = list(unit = "unit", time = "time", outcome = "outcome", treated =
  "treated"))

Arguments

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

Value

List of data to use as an argument for Synth::synth, whether the unit was actually treated


ebenmichael/ents documentation built on May 31, 2019, 8:45 p.m.