powered by
Compute the Local Polynomial Regression smoother matrix of degree p. Special cases: p=0 is Nadaraya-Watson, p=1 is Local Linear Regression.
S.LPR(tt, h, p = 1, Ker = "norm", w = NULL, cv = FALSE)
An n x n smoother matrix S.
Evaluation points (numeric vector).
Bandwidth parameter.
Polynomial degree (default 1 for local linear).
Kernel function or name.
Optional weights vector.
Logical. If TRUE, compute leave-one-out cross-validation matrix.
tt <- seq(0, 1, length.out = 50) S <- S.LPR(tt, h = 0.1, p = 2) # Local quadratic regression
Run the code above in your browser using DataLab