1

I am trying to use the synth package in R.

The way synthetic control works is that it matches pre-treatment data for a treated unit and control units, and it selects weights to approximate equate the two, so that the treated unit "looks like" a synthetic control unit.

The way it works is explained here.

When matching on the pre-treatment outcomes, we pick up to T0 linear combination of the data. The synth package seems to only pick just one, and it is the one that equates the MEANS. This is what the predictor.op function does.

Suppose, however, I want to just have it so that I select all T0 linear combinations so X1 is a T0 x 1 vector rather than a 1x1, is there a way to do this non-manually?

wolfsatthedoor
  • 7,163
  • 18
  • 46
  • 90
  • I don't exactly understand what you mean by "we pick up to `T0` linear combinations of the data." This method (at least in its straightforward usage) picks a single linear combination of the control units such that this combination minimizes a loss function. I don't have time at the moment to discuss this in depth, but the weighted combination is meant to stand in as the counterfactual for the treated unit. This sounds like something of a methodology question where you want something similar to the synthetic control, but different. perhaps https://stats.stackexchange.com/ is a better place? – lmo Aug 25 '17 at 00:47
  • @Imo Sure, the weights are w, but check out the paper and you will see that when you match on pre-treatment outcomes to find the synthetic "w"'s, you have to pick M linear combinations of pre-treatment outcomes (up to T0) of the pre-treatment data on which you base your matching. – wolfsatthedoor Aug 25 '17 at 03:51
  • I asked the same question [here](https://stackoverflow.com/questions/52094894/constructing-a-synthetic-treatment-group-using-synth) – Sam Aug 30 '18 at 10:35

2 Answers2

0

I am not sure what exactly you are trying to do but I ran into your question because I had a similar issue with Synth() so maybe this will help:

I tried to create a synthetic control unit using all pre-treatment outcome observations and since Synth() averages across all pre-treatment periods, that wasn't too straightforward. What I did is to create individual covariates for each pre-treatment period and then specify those covariates in predictor. That is equivalent to not applying any operator to pre-treatment outcome data.

JBN
  • 67
  • 4
0

Just in case someone runs into a similar problem, a follow up on @JBN answer, I wanted to implement this for many periods, so I did it with lapply to avoid writing tons of code.

For example, if the predictor variable you want to use is called x and the pretreatment period is from 1 to 20, your input could be special.predictors = lapply(1:20, function(i){list("x", i, "mean")}).

Note that one must provide an argument for time.predictors.prior, but it is independent of these additional special predictors, so any argument should do it.

ocramest
  • 1
  • 1