Print

Print


Dear all,

Here are the responses I got to my question on variable kernel density
bandwith in "R". The original question is at the bottom of the mail.
Thanks to all who contributed.


1. See ?density  #base package

density(x, bw = "nrd0", adjust = 1,......

varying 'adjust=' to a greater or less degree from its default=1,alters
the band width parameter.

          'bw' can also be a character string giving a rule to choose
          the bandwidth.  See 'bw.nrd'.

See Also:

    ?bw.nrd

2. The univariate estimation function from
the package GenKern does adaptive
bandwidths in 2 ways - a bandwidth for
each observation (does this in 2D as
well) and I have just got it to do one
for each bin as described in Wand and Jones.

3. The sm library will handle this, although you have to define the
different bandwidths for each data point.  The library is associated
with a book (see www.stats.gla.ac.uk/~adrian/book) which has an
example of this.

4. If you are using density() then you can specify your bandwidth using;

density(x,bw=)

5. Try the library GenKern (available at the R's CRAN website). The
function KernSec() allows use of both sample-point adaptive and local
(i.e. estimation point adaptive) bandwidths.

6. Have a look at the locfit package

7. The locfit package can do adaptive bandwidth selection.  The book
"local regression and likelihood" by Prof. Loader describes the software
as well as the theory and computation, etc.

8. You could try the function at

http://www.bioss.sari.ac.uk/~markb/kernels/mbvb.html

which was written for S-Plus but should work in R.
You need only supply a fixed bandwidth value, and
I'd recommend using the Sheather & Jones plug-in
value that you can get from the "sm" package in R.





-----Original Message-----
From: A UK-based worldwide e-mail broadcast system mailing list
[mailto:[log in to unmask]] On Behalf Of Kwabena Adusei-Poku
Sent: Mittwoch, 3. November 2004 12:37
To: [log in to unmask]
Subject: Variable kernel bandwidth in R


Dear all,

I am presently using kernel density estimation in "R". Could somebody
tell me where to find a contributed package in "R" which allows one to
use variable bandwidths in "R"?

Regards,

Kwabena Adusei-Poku
[log in to unmask]