Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Lwls2DDeriv

Two dimensional local linear kernel smoother to target derivatives.


Description

Two dimensional local weighted least squares smoother. Only a local linear smoother for estimating the original curve is available (no higher order)

Usage

Lwls2DDeriv(
  bw,
  kern = "epan",
  xin,
  yin,
  win = NULL,
  xout1 = NULL,
  xout2 = NULL,
  xout = NULL,
  npoly = 1L,
  nder1 = 0L,
  nder2 = 0L,
  subset = NULL,
  crosscov = TRUE,
  method = "sort2"
)

Arguments

bw

A scalar or a vector of length 2 specifying the bandwidth.

kern

Kernel used: 'gauss', 'rect', 'gausvar', 'epan' (default), 'quar'.

xin

An n by 2 data frame or matrix of x-coordinate.

yin

A vector of y-coordinate.

win

A vector of weights on the observations.

xout1

a p1-vector of first output coordinate grid. Defaults to the input gridpoints if left unspecified.

xout2

a p2-vector of second output coordinate grid. Defaults to the input gridpoints if left unspecified.

xout

alternative to xout1 and xout2. A matrix of p by 2 specifying the output points (may be inefficient if the size of xout is small).

npoly

The degree of polynomials (include all x^a y^b terms where a + b <= npoly)

nder1

Order of derivative in the first direction

nder2

Order of derivative in the second direction

subset

a vector with the indices of x-/y-/w-in to be used (Default: NULL)

crosscov

using function for cross-covariance estimation (Default: TRUE)

method

should one try to sort the values xin and yin before using the lwls smoother? if yes ('sort2' - default for non-Gaussian kernels), if no ('plain' - fully stable; de)

Value

a p1 by p2 matrix of fitted values if xout is not specified. Otherwise a vector of length p corresponding to the rows of xout.


fdapace

Functional Data Analysis and Empirical Dynamics

v0.5.6
BSD_3_clause + file LICENSE
Authors
Cody Carroll [aut, cre] (<https://orcid.org/0000-0003-3525-8653>), Alvaro Gajardo [aut], Yaqing Chen [aut], Xiongtao Dai [aut], Jianing Fan [aut], Pantelis Z. Hadjipantelis [aut], Kyunghee Han [aut], Hao Ji [aut], Shu-Chin Lin [ctb], Paromita Dubey [ctb], Hans-Georg Mueller [cph, ths, aut], Jane-Ling Wang [cph, ths, aut]
Initial release
2021-01-10,

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.