Calculate weight of evidence

The concept weight of evidence is used in information theory and can be applied together with another concept information value to perform dimension reduction. If you want to filter out variables according to their predictive power on a specific response variable, then you can look up for woe and information value on the internet. Here I present a small macro in how to calculate the woe's. Note that the var is the variable that you want to calculate the woes. It must be a string without empty space in its values. And the response variable is binary. A lot of improvements can be made. I will probably do it once I have more free time.