KernelDensity.jl icon indicating copy to clipboard operation
KernelDensity.jl copied to clipboard

Transforms of Variables

Open bdeonovic opened this issue 10 years ago • 2 comments

Would there be any easy way to implement doing Kernel density estimation on transforms of variables? For example, I have a variable that is constrained to be between 0 and 1, it would be better for me to do the kernel density estimate of the logit of the variable or the complementary log log of the variable, obtain the fit, and then scale it by the appropriate value.

It would be nice if this was built into the package for particular transforms of interest so that packages like gadfly can use them without the user having to manually transform the variables, feed those variables to gadfly etc.

bdeonovic avatar Apr 20 '15 15:04 bdeonovic

That's an interesting idea, it is essentially equivalent to using a position-dependent kernel (though we don't support that either).

simonbyrne avatar Apr 20 '15 16:04 simonbyrne

Transforms of variable is an intuitive idea to deal with bounded data but it proves not working well. Since the inverse of logit function can amplify tiny disturbance into huge, the resulted density generally vibrates widely near the boundary. There are several ways to deal with bounded data. Using beta kernel is one of them.

panlanfeng avatar Sep 18 '15 18:09 panlanfeng