lp1D: one-dimensional local polynomial smoother

Description Usage Arguments Value

View source: R/locpoly.R

Description

one-dimensional local polynomial smoother

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
lp1D(
  x,
  y,
  h = NULL,
  newx = x,
  degree = 1,
  weight = NULL,
  kernel = "epanechnikov",
  sorted = F
)

Arguments

x

a vector of observed values of the predictor

y

a vector of observed values of the response

h

the bandwidth, either a numeric or NULL; if NULL, the automatically selected by five-fold CV

newx

a vector of new values of the predictor; set to x by default

degree

the degree of local polynomials, nonnegative integer

weight

a vector of real numbers obtaining the weight for each observations; if NULL, then equal weight

kernel

a kernel from the package locpol, supported are 'epanechnikov', "rectangular", "triangular", "quartic", "triweight", "tricube", "cosine", "gauss", "logistic", "sigmoid" and "silverman"

sorted

indicator of whether the array x and newx are sorted in increasing order

Value

a list of the following elements

h

the selected bandwidth or input bandwidth

x

the original input

y

the original input

weight

the original input

kernel

the original input

degree

the original input

yhat

the estimated response at newx


linulysses/mcfda documentation built on Jan. 17, 2021, 8:53 a.m.