Two dimensional local weighted least squares smoother. Only a local linear smoother for estimating the original curve is available (no higher order)
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"
)
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.
A scalar or a vector of length 2 specifying the bandwidth.
Kernel used: 'gauss', 'rect', 'gausvar', 'epan' (default), 'quar'.
An n by 2 data frame or matrix of x-coordinate.
A vector of y-coordinate.
A vector of weights on the observations.
a p1-vector of first output coordinate grid. Defaults to the input gridpoints if left unspecified.
a p2-vector of second output coordinate grid. Defaults to the input gridpoints if left unspecified.
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).
The degree of polynomials (include all
Order of derivative in the first direction
Order of derivative in the second direction
a vector with the indices of x-/y-/w-in to be used (Default: NULL)
using function for cross-covariance estimation (Default: TRUE)
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)