I wish to produce a weighted (Gaussian?) kernel density estimate, in 2 dimensions, where the weights are permitted to be ***negative***. (I can ASSURE you that there are perfectly legitimate reasons why I want to do this. :-)) Clearly it is not really a density that I am trying to estimate. I had a go at using sm.density() from the sm package, but this requires that the weights be positive. Is there any software lurking in the undergrowth that I could use for my purpose? Or bits and pieces that could give me a start on building the machine that I need? Ta. cheers, Rolf Turner rolf at math.unb.ca
Kernel smoothing.
2 messages · Rolf Turner, Jason Turner
On Wed, Dec 18, 2002 at 04:53:37PM -0400, Rolf Turner wrote:
I wish to produce a weighted (Gaussian?) kernel density estimate, in 2 dimensions, where the weights are permitted to be ***negative***. (I can ASSURE you that there are perfectly legitimate reasons why I want to do this. :-))
hmm... "trust me, I know what I'm doing". The very phrase that results in many, many children being born each year.... ;)
Clearly it is not really a density that I am trying to estimate.
possible quick workarounds... 1) remove entries that have negative weights before you calculate the density? 2) re-scale your weights so they're all positive. Depending on the weighting (and exctly what you're doing), my.weights2 <- exp(my.weights) or my.weights2 <- my.weights + min(my.weights) Cheers Jason
Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz