mhamjediers / nopo_decomposition

Stata ado files to run matching-based decompositions
MIT License
3 stars 0 forks source link

Does it only work with one-to-many matching (nearest-single-neighbor-matching with replacemant?) #16

Closed mhamjediers closed 1 year ago

mhamjediers commented 1 year ago

If yes, the kmatch-postestimation should have a check and error message if not nn(1) or if wor (without replacement) specified

maximilian-sprengholz commented 1 year ago

The wor excemption makes sense to me, but everything else should be accomodated by the weights, no? Default in kmatch md is kernel matching with automatically determined bandwidth. Nearest neighbor matching has to be specifically requested via nn(#).

maximilian-sprengholz commented 1 year ago

Does now abort after kmatch md ..., nn() wor:

// abort if matched without replacement (replacement necessary for correct weights)
if ("`e(wor)'" == "wor") {
    dis as error "nopo decomp requires matching with replacement. Option wor not allowed in:"
    dis as error " `_kmatch_cmdline'"
    error 322
    exit
}

Closing.