Description Usage Arguments Value Examples
View source: R/estimate_curve.R
This function performs the smoothing of a curve using the Nadaraya-Watson estimator given a particular kernel.
1 2 3 4 5 6 7 8 | estimate_curve(
curve,
U,
b,
t0_list = NULL,
kernel = "epanechnikov",
n_obs_min = 1
)
|
curve |
A list, with two entries:
|
U |
A vector of numeric, sampling points at which estimate the curve. |
b |
Numeric or vector of numeric, estimation of the bandwidth. If one is provided, we use a unique bandwidth for the curve. However, if a vector is given, the bandwidth changes depending on the sampling points. |
t0_list |
A vector of numeric, times at which the bandwidths have been
estimated. Only used if the parameter |
kernel |
Character string, the kernel used for the estimation:
|
n_obs_min |
Integer, minimum number of observation for the smoothing |
A list, with two entries:
$t The sampling points
$x The estimated points.
1 2 3 4 5 6 7 | X <- generate_piecewise_fractional_brownian(N = 1, M = 300,
H = c(0.2, 0.5, 0.8),
sigma = 0.05)
estimate_curve(X[[1]],
U = seq(0, 1, length.out = 200),
b = c(0.2, 0.5, 0.8),
t0_list = c(0.16, 0.5, 0.83))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.