Learn R Programming

aws (version 1.9-4)

lpaws: Local polynomial smoothing by AWS

Description

The function allows for structural adaptive smoothing using a local polynomial (degree

Usage

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)

Arguments

y
Response, either a vector (1D) or matrix (2D). The corresponding design is assumed to be a regular grid in 1D or 2D, respectively.
degree
Polynomial degree of the local model
hmax
maximal bandwidth
aws
logical: if TRUE structural adaptation (AWS) is used.
memory
logical: if TRUE stagewise aggregation is used as an additional adaptation scheme.
lkern
character: location kernel, either "Triangle", "Plateau", "Quadratic", "Cubic" or "Gaussian"
homogen
logical: if TRUE the function tries to determine regions where weights can be fixed to 1. This may increase speed.
earlystop
logical: if TRUE the function tries to determine points where the homogeneous region is unlikely to change in further steps. This may increase speed.
aggkern
character: kernel used in stagewise aggregation, either "Triangle" or "Uniform"
sigma2
Error variance, the value is estimated if not provided.
hw
Regularisation bandwidth, used to prevent from unidentifiability of local estimates for small bandwidths.
ladjust
factor to increase the default value of lambda
u
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
graph
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).
demo
logical: if TRUE wait after each iteration

Value

aws with slots
y = "numeric"
y
dy = "numeric"
dim(y)
x = "numeric"
numeric(0)
ni = "integer"
integer(0)
mask = "logical"
logical(0)
theta = "numeric"
Estimates of regression function and derivatives, length: length(y)*(degree+1)
mae = "numeric"
Mean absolute error for each iteration step if u was specified, numeric(0) else
var = "numeric"
approx. variance of the estimates of the regression function. Please note that this does not reflect variability due to randomness of weights.
xmin = "numeric"
numeric(0)
xmax = "numeric"
numeric(0)
wghts = "numeric"
numeric(0)
degree = "integer"
degree
hmax = "numeric"
effective hmax
sigma2 = "numeric"
provided or estimated error variance
scorr = "numeric"
0
family = "character"
"Gaussian"
shape = "numeric"
numeric(0)
lkern = "integer"
integer code for lkern, 1="Plateau", 2="Triangle", 3="Quadratic", 4="Cubic", 5="Gaussian"
lambda = "numeric"
effective value of lambda
ladjust = "numeric"
effective value of ladjust
aws = "logical"
aws
memory = "logical"
memory
homogen = "logical"
homogen
earlystop = "logical"
eralustop
varmodel = "character"
"Constant"
vcoef = "numeric"
numeric(0)
call = "function"
the arguments of the call to lpaws

References

Joerg Polzehl, Vladimir 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

See Also

link{awsdata},aws, aws.irreg

Examples

Run this code
library(aws)
# 1D local polynomial smoothing
## Not run: demo(lpaws_ex1)
# 2D local polynomial smoothing
## Not run: demo(lpaws_ex2)


Run the code above in your browser using DataLab