Description Usage Arguments Details Author(s) References See Also Examples
Plots the magnitude of the empirical characteristic function at frequencies 0 to smax
.
1 2 |
x |
A univariate data set. |
y |
A vector of responses, for regression only. |
smax |
The algorithm searches for smoothing parameters on the interval |
normalize |
Rescale the sample characteristic function so that it is 1 at frequency 0. Does not affect plots for density estimation. For regression it is often better to leave this as |
n.points |
The number of points in |
c.thresh |
For regression, this is not meaningful. For density estimation, the bandwidth is chosen by looking for the first time the sample characteristic function drops below |
... |
Currently unimplemented. |
Produces a plot that is helpful in choosing the bandwidth for infinite order flat-top kernel smoothers. Roughly, the bandwidth should be chosen to let the large low frequency component pass unpreturbed while damping out smaller high frequency components. This can be accomplished by choosing h = 1/l
where l
is a frequency threshold above which the sample characteristic function is negligible. For regression, this is done heuristically. For density estimation there is a formal recommendation, implemented in bwplot.numeric
.
Timothy L. McMurry
Politis, D. N. (2003). Adaptive bandwidth choice. Journal of Nonparametric Statistics, 15(4-5), 517-533.
McMurry, T. L. and Politis, D. N. Minimally biased nonparametric regression and autoregression. RevStat - Statistical Journal, 6(2):123-150, 2008
bwadap
, bwadap.ts
, bwplot.numeric
, bwplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ### Density Estimation
set.seed(123)
x <- rnorm(100)
bwplot(x, smax=8)
#Choose bandwidth roughly h=1/2
plot(iodensity(x, bw=1/2), type="l")
rug(x)
#### Nadaraya-Watson kernel regression
y <- sin(x) + .1 *rnorm(100)
bwplot(x,y, smax=12)
# Choose bandwidth roughly h = 1/2.5
plot(x, y)
lines(ioksmooth(x, y, bw = 1/2.5, kernel="SupSm"), type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.