Closed josherrickson closed 6 years ago
> exactMatch(pr ~ cost, data = nuclearplants)
Error in .local(x, ...) :
There is no overlap of value between treatment and control groups.
Closing. @benthestatistician feel free to suggest a better error message. See test.exactMatch.R#L255 for simpler examples of the two scenarios (truly unique X versus unique across groups).
Commit 4f99c96 on branch issue206-NAs-in-blocking-vars updates this a bit. I think that if the user passed a character or factor variable with these odd characteristics, we should give her the benefit of the doubt and try to create the exact matching structure she requested, even if it forbids all matches. (And despite the fact that it may potentially cause the error given in the issue statement.)
(I thought this was a nice solution btw, particularly the test distinguishing two scenarios that aren't distinguished in the code.)
I believe this is due to exactMatch.R#L111 returning all empty vectors since nothing is eligible match. (This can also occur if the RHS variable is unique between Treatment/Control.)