Augsynth - Plotting the results of a synthetic control method calculation

I wondered if anyone could help with a rather basic question. I'm using a new package called augsynth which is detailed here. Basically it allows you to do a synthetic control method approach. In the example on that page, it's used to test whether a tax cut in Kansas helped the economy or not. You basically create a "synthetic Kansas" that can then be used as a comparison with how gross state product (GSP) in "real Kansas" actually changed and thereby illustrate whether the tax cut worked or not.

I've followed all the instructions on that page and done all of the steps to create the "synthetic Kansas". My question is how do you actually plot the results of this? What I really want to do is to create a plot like the first chart on this page - i.e. a simple chart that shows GSP in real Kansas over the period covered by the dataset and a dashed line showing GSP in "synthetic Kansas" over the same period. It sounds really simple but I have no idea what to do. The only plots the augsynth page shows you are basically just plots showing how well the "synthetic Kansas" fits with real Kansas.

I wondered if anyone can help - even if you don't know anything about synthetic control methods, it's probably easy to work out, I'm just a bit of a novice so I'm clueless.

In outline, you would take two data frames, with real vs. synthetic and do something along the following lines

p <- ggplot(real,aes(Time,estimate) +
     geom_line() +
     geom_line(synth,aes(Time,estimate) +
     geom_vline(xintercept = 2012)

Probably the challenge will be converting Time to a proper datetime object if it isn't already. After that it's mainly a matter of decoration and labeling.

Give it a shot and come back with a reprex with data frames skinnied down to just the two columns for each of real and synth. You can get those by copying the output of unparse(real) and unparse(synth)

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.