JonasMoss / kdensity

An R package for kernel density estimation with parametric starts and asymmetric kernels.
Other
14 stars 4 forks source link

Support for weights? #64

Closed Avi-Kenny closed 9 months ago

Avi-Kenny commented 3 years ago

Hi! I'm using your package for kernel density estimation in an application in which data are sampled with known sampling weights. Do you have any plans to extend the package to allow for weights? See, for example the w argument in ks::kde() or the weights argument in stats::density(). If you have no plans to do this anytime soon, I could open a branch and take a stab at coding this up.

JonasMoss commented 3 years ago

Hi @Avi-Kenny! We don't have any plans for implementing weights. Frankly, I wouldn't know how to do it, at least not off the top of my head. ;)

But please go ahead and make a branch!

Avi-Kenny commented 3 years ago

@JonasMoss sounds great! I'll keep you posted.

Avi-Kenny commented 3 years ago

@JonasMoss FYI I've realized that ks::kde.boundary() supports weights, and so for now, this is sufficient for my purposes. Perhaps I'll have time for this in the future!

Avi-Kenny commented 9 months ago

@JonasMoss thank you!