This function performs the smoothing of a curve using the Nadaraya-Watson estimator given a particular kernel.
estimate_curve(
curve,
grid,
bandwidth,
bandwidth_times = NULL,
kernel_name = "epanechnikov",
n_obs_min = 1
)
List, with two entries:
$t Sampling points.
$x Observed points.
Vector, sampling points at which the curve is estimated.
Vector, estimation of the bandwidth. If a unique element is provided, we use a unique bandwidth for the curve. However, if a vector is given, the bandwidth changes depending on the sampling points.
Vector (default = NULL), times at which the bandwidths
have been estimated. Only used if the parameter bandwidth
is a vector.
String (default = 'epanechnikov'), the kernel used for the estimation:
epanechnikov
uniform
biweight
Integer (default = 1), minimum number of observation for the smoothing.
List, with two entries:
$t Sampling points.
$x Estimated points.