sdfordham/pysyncon

Extracting numerical data

kloskas opened this issue · 4 comments

Thanks for this package, it's awesome that covers multivariate units for fit instead of just the outcome variable! I just wanted to know how to get the actual gaps_plot, cv_result.plot, path_plot data instead of only graphs, they're useful visually but I wanted to check the cumulative effect of the treatment.

You need to use some private methods to get these

  • gaps_plot: you can use synth._gaps() it will return a pandas series with the data points
  • path_plot: you can use synth._synthetic() it will return a pandas series with the data points
  • cv_result.plot: you can use something like:
pd.Series(data=augsynth.cv_result.errors_mean, index=augsynth.cv_result.lambdas)

Thanks, I only get the data until the treatment though... how can I see the projected post-treatment?

E.g. in the situation of the Basque paper, one might run

ser_1 = synth._gaps(time_period=range(1955, 1998))
ser_2 = synth._synthetic(time_period=range(1955, 1998))

Great thanks!