estimate_curve: Perform the smoothing of individual curve.

Description Usage Arguments Value Examples

View source: R/estimate_curve.R

Description

This function performs the smoothing of a curve using the Nadaraya-Watson estimator given a particular kernel.

Usage

1
2
3
4
5
6
7
8
estimate_curve(
  curve,
  U,
  b,
  t0_list = NULL,
  kernel = "epanechnikov",
  n_obs_min = 1
)

Arguments

curve

A list, with two entries:

  • $t The sampling points

  • $x The observed points.

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 b is a vector.

kernel

Character string, the kernel used for the estimation:

  • epanechnikov (default)

  • uniform

  • beta

  • mBeta

n_obs_min

Integer, minimum number of observation for the smoothing

Value

A list, with two entries:

Examples

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))

StevenGolovkine/denoisr documentation built on Nov. 15, 2021, 8:44 a.m.