tags:

views:

159

answers:

2

I have data of this form:

 x    y
 1    0.19
 2    0.26 
 3    0.40
 4    0.58
 5    0.59
 6    1.24
 7    0.68
 8    0.60
 9    1.12
10    0.80
11    1.20
12    1.17
13    0.39

I'm currently plotting a kernel-smoothed density estimate of the x versus y using this code:

   smoothed = ksmooth( d$resi, d$score, bandwidth = 6 )
   plot( smoothed )

I simply want a plot of the x versus smoothed(y) values, which is ## Heading ##

However, the documentation for ksmooth suggests that this isn't the best kernel-smoothing package available:

This function is implemented purely for compatibility with S, although it is nowhere near as slow as the S function. Better kernel smoothers are available in other packages.

What other kernel smoothers are better and where can these smoothers be found?

A: 

Not sure where you want to go with this question:

  • Did you look at packages on CRAN ?

  • Did you search, eg via the excellent RSeek.org engine ?

  • Did you try the mailing list archives ?

  • Did you consult the literature on nonparametric smoothers, maybe starting with Haerdle's 1992 book?

Dirk Eddelbuettel
btw It just me or RSeek give strange results lately. Precisely - not related to R, for example "mail".
Marek
It still works fine for me, eg for this query it lead to four appropriate packages.
Dirk Eddelbuettel
Or, use the `RSiteSearch("whatever you like")` command :)
nico
+5  A: 

If you "simply want a plot of the x versus smoothed(y)", then I recommend considering loess in package stats - it's simple, fast and effective. If instead you really want a regression based on kernel smoothing, then you could try locpoly in package KernSmooth or npreg in package np.

nullglob