From adrian at maths.uwa.edu.au  Mon Apr 18 07:17:18 2005
From: adrian at maths.uwa.edu.au (Adrian Baddeley)
Date: Mon Apr 18 07:17:48 2005
Subject: [Rd] density() with weights
Message-ID: <16995.17118.603485.179514@maths.uwa.edu.au>

Hello - 

Recently I needed to compute kernel density estimates 
for a vector of observations x with given weights w
instead of the conventional equal weights w[i] = 1/length(x).

AFAIK, the existing code in 'base' does not accept weights. 

It wasn't hard to modify the C and R code for `density' in the base library
to accept weights. Source code is available at this URL

   <http://www.maths.uwa.edu.au/~adrian/density.html>

Just a suggestion.

regards
Adrian Baddeley.


[Rd] density() with weights
Adrian Baddeley