I experienced an issue where matchfailed() returned NA for a small number of observations, breaking a script. (Unfortunately I couldn't stop to investigate.) Hypothesis: this is how it records an exact matching category with no treatments or controls, such that it wouldn't make sense to try to make matches within it.
[ ] Whether that's correct or not should be recorded in the Roxygen block describing the function, and there should be tests to confirm the behavior.
[ ] Accompanying that should be a few simple tests to confirm thatmatchfailed() does indeed mark subclasses in which matching failed, and doesn't mark those in which it succeeded.
[ ] The person who does this should also test any other scenarios occurring to them where the function might unexpectedly return an NA as opposed to a TRUE or FALSE.
I experienced an issue where
matchfailed()
returned NA for a small number of observations, breaking a script. (Unfortunately I couldn't stop to investigate.) Hypothesis: this is how it records an exact matching category with no treatments or controls, such that it wouldn't make sense to try to make matches within it.matchfailed()
does indeed mark subclasses in which matching failed, and doesn't mark those in which it succeeded.NA
as opposed to aTRUE
orFALSE
.