I have another example use case I used this for. In criminology, there is a hypothesis that an individual is less likely to commit predatory crime nearby their home, peaks at slightly further out, and then distance decays. I showed using gamma models to fit this for some journey-to-crime distances, but also use this KDE technique in a non-parametric way to confirm the buffer exists https://github.com/apwheele/buffer.

You may think offhand that this forces the KDE to have the hump, but I show in the appendix one simulated example in which the PDF is monotonically decreasing.

This trick is also useful for (0,1) data (like a collection of probabilities). The back transformation there is `d$ty <- d$y/(d$x*(1-d$x))`.