The function allows for structural adaptive smoothing using a local polynomial (degree <=2) structural assumption. Response variables are assumed to be observed on a 1 or 2 dimensional regular grid.
lpaws(y, degree = 1, hmax = NULL, aws = TRUE, memory = FALSE, lkern = "Triangle",
homogen = TRUE, earlystop = TRUE, aggkern = "Uniform", sigma2 = NULL,
hw = NULL, ladjust = 1, u = NULL, graph = FALSE, demo = FALSE)
returns anobject of class aws
with slots
y
dim(y)
numeric(0)
integer(0)
logical(0)
Estimates of regression function and derivatives, length: length(y)*(degree+1)
Mean absolute error for each iteration step if u was specified, numeric(0) else
approx. variance of the estimates of the regression function. Please note that this does not reflect variability due to randomness of weights.
numeric(0)
numeric(0)
numeric(0), ratio of distances wghts[-1]/wghts[1]
degree
effective hmax
provided or estimated error variance
0
"Gaussian"
numeric(0)
integer code for lkern, 1="Plateau", 2="Triangle", 3="Quadratic", 4="Cubic", 5="Gaussian"
effective value of lambda
effective value of ladjust
aws
memory
homogen
eralustop
"Constant"
numeric(0)
the arguments of the call to lpaws
Response, either a vector (1D) or matrix (2D). The corresponding design is assumed to be a regular grid in 1D or 2D, respectively.
Polynomial degree of the local model
maximal bandwidth
logical: if TRUE structural adaptation (AWS) is used.
logical: if TRUE stagewise aggregation is used as an additional adaptation scheme.
character: location kernel, either "Triangle", "Plateau", "Quadratic", "Cubic" or "Gaussian". The default "Triangle" is equivalent to using an Epanechnikov kernel, "Quadratic" and "Cubic" refer to a Bi-weight and Tri-weight kernel, see Fan and Gijbels (1996). "Gaussian" is a truncated (compact support) Gaussian kernel. This is included for comparisons only and should be avoided due to its large computational costs.
logical: if TRUE the function tries to determine regions where weights can be fixed to 1. This may increase speed.
logical: if TRUE the function tries to determine points where the homogeneous region is unlikely to change in further steps. This may increase speed.
character: kernel used in stagewise aggregation, either "Triangle" or "Uniform"
Error variance, the value is estimated if not provided.
Regularisation bandwidth, used to prevent from unidentifiability of local estimates for small bandwidths.
factor to increase the default value of lambda
a "true" value of the regression function, may be provided to
report risks at each iteration. This can be used to test the propagation condition with u=0
logical: If TRUE intermediate results are illustrated graphically. May significantly slow down the computations in 2D. Please
avoid using the default X11()
on systems build with cairo
, use
X11(type="Xlib")
instead (faster by a factor of 30).
logical: if TRUE wait after each iteration
Joerg Polzehl polzehl@wias-berlin.de
J. Polzehl, K. Papafitsoros, K. Tabelow (2020). Patch-Wise Adaptive Weights Smoothing in R, Journal of Statistical Software, 95(6), 1-27. doi:10.18637/jss.v095.i06 .
J. Polzehl, V. Spokoiny, in V. Chen, C.; Haerdle, W. and Unwin, A. (ed.) Handbook of Data Visualization Structural adaptive smoothing by propagation-separation methods. Springer-Verlag, 2008, 471-492. DOI:10.1007/978-3-540-33037-0_19.
link{awsdata}
,aws
, aws.irreg
library(aws)
# 1D local polynomial smoothing
if (FALSE) demo(lpaws_ex1)
# 2D local polynomial smoothing
if (FALSE) demo(lpaws_ex2)
Run the code above in your browser using DataLab