ebenmichael / augsynth

Augmented Synthetic Control Method
MIT License
147 stars 52 forks source link

Minor error in print function for augsynth #17

Closed chriscandelaria closed 4 years ago

chriscandelaria commented 4 years ago

When running the print function for an augsynth object, I receive the following warning message:

Warning message:
In colMeans(augsynth$data$y[augsynth$data$trt == 1, , drop = F]) -  :
  longer object length is not a multiple of shorter object length

I believe the error is caused by the following lines of code:

https://github.com/ebenmichael/augsynth/blob/180d182c808873666a554b971881af6cf754c024/R/augsynth.R#L188-L190

This warning message is isolated to the print function (I think). The only issue that arises from this warning is that there is a discrepancy between the Average ATT Estimate generated from the print function and the the Average ATT Estimate generated from the summary function.

To replicate this issue, one can run the code for the augsynth vignette.

ebenmichael commented 4 years ago

Thanks for catching this! Fixed it in the above commit!