In the following data set I have three variables bad xx and yy. I want to make histograms of XX and YY such that at each level of a variable say XX, I want to divide the column by proportion or percentage of bad=1 and bad=0. My following attempts does this job but it divides each column by percentage of bad=0 and bad=1 w.r.t to all the values of XX. For variable XX, I want bars of the histogram at 2,4,6,8 and 10, however division of each bar should be done based on the number of bad=1/bad=0 within that level of XX. If this can be done, all the vertical bars will have equal height, but get divided by percentage/proportion of bad values within that level of XX. Using the following code I have this plot As always, I am expecting some help from one of you experts. Thanks again for your time!
... View more