xuyiqing / gsynth

Generalized Synthetic Control Method
Other
131 stars 40 forks source link

checks that N_tr > 40 for nonparametric bootstrap #63

Closed beniaminogreen closed 3 years ago

beniaminogreen commented 3 years ago

This pull request would add a safety check stopping the user from using the nonparametric bootstrap when there are fewer than 40 treated units. An alternate strategy could be to raise a warning instead of stopping the program.

I have created the PR because I have read a few papers which use the nonparametric bootstrap with just one or two treated units, in spite of the recommendations given by the documentation. Usage of the nonparametric bootstrap in this context generally seems to create standard-errors that over-exclude zero (at least in the monte carlo simulations I have run), so I think it would be useful for the program to give a warning or error to ensure that users are using the correct bootstrap procedure.

xuyiqing commented 3 years ago

Thank you so much. We'll look into this.

On Wed, Jul 14, 2021 at 2:43 PM Beniamino Green @.***> wrote:

@.**** commented on this pull request.

In R/default.R https://github.com/xuyiqing/gsynth/pull/63#discussion_r669975496:

@@ -273,6 +273,12 @@ gsynth.default <- function(formula = NULL,data, # a data frame (long-form) cat("\nFor clustered bootsrap, please use the nonparametric procedure.\n") }

These lines check that the number of treated units is greater than 40 if the nonparametric bootstrap has been selected. Sorry about all the other edits - my editor automatically removes trailing whitespaces.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xuyiqing/gsynth/pull/63#pullrequestreview-706746729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2PKGB4NP3OX2344RVC6G3TXYAJNANCNFSM5AMIIWMA .