Treatment Difference Formula (Uplift Model)

This converts a prediction formula into a new Treatment Difference formula. The formula column must involve a 2-level treatment effect that interacts with other effects. If it doesn't interact, the resulting uplift formula will create zeros. If the treatment effect has more than two levels, it will make the difference for the last versus the first level. This is useful for Uplift Modeling, where you want this formula to choose which potential customers to apply a treatment intervention to for marketing programs. i.e. for which covariate values is the different of the treatment on the response greatest? The same technique can be important in personalized medicine, where you want to choose groups that the treatment is effective with.