0

I'm using the Synth package in R. I properly created my dataprep.out and synth(dataprep.out). Following, I created my path.plot and it's very fine.

Now I want to find the values estimated by Synth for my outcome variable for each time period. Where can I find this info, please?

Thanks in advance

I cannot find the values of the outcome variable created by Synth throughout my time periods. The plot created by path.plot shows the trajectory of the synthetic estimator, but not the values estimated.

  • Can you provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? – jrcalabrese Feb 13 '23 at 20:50

1 Answers1

0

You could get the synthetic control values by using the weights obtained with the synth function, after aplying it to your dataprep object.

Assuming that your dataprep object is called dp, the observed outcomes for your treated unit are stored in dp$Y1plot, and for the donor pool, in dp$Y0plot.

Then, suppose that your synth object is called sc. Now, you just have to make the following matrix multiplication to get the synthetic control outcomes: cf = dp$Y1plot%*%sc$solution.w.

Now you can compare the actual outcomes dp$Y1plot, with their counterfactuals cf.

ocramest
  • 1
  • 1
  • Your answer could be improved with a minimal working example of the code in addition to the explanation you have already given. In fact, ideally the question author would already do this and give you a starting point for the code in your answer. Still, even if they haven't, it is still good practice to do it yourself for the benefit of the OP as well as any future readers. – maja zaloznik Aug 24 '23 at 06:58