Added new function to filter a population object. Also definitions for the effects in the sampling of potential outcomes