Right now, all of pybalance is built against the idea of matching a pool to a target population. Essentially, we can only compute ATT. This is very restrictive and limits the use of pybalance. This issue is to remove the assumption that the target is special and allow subsets of both pool and target to be taken.
This requires an interface change. To preserve backwards compatibility, I suggest the following:
Allow the distance method in all balance calculators to take an optional second argument "target_subset":
if target_subset is not passed, then assume the whole target population.
In a later release, we will probably have to change the name of pool and target, since this is now misleading. But this will break backward compatibility and therefore should be delayed until 1.0.
Right now, all of pybalance is built against the idea of matching a pool to a target population. Essentially, we can only compute ATT. This is very restrictive and limits the use of pybalance. This issue is to remove the assumption that the target is special and allow subsets of both pool and target to be taken.
This requires an interface change. To preserve backwards compatibility, I suggest the following:
Allow the distance method in all balance calculators to take an optional second argument "target_subset":
beta.distance(pool_subset) --> beta.distance(pool_subset, target_subset)
if target_subset is not passed, then assume the whole target population.
In a later release, we will probably have to change the name of pool and target, since this is now misleading. But this will break backward compatibility and therefore should be delayed until 1.0.