The function implements the propagation separation approach to nonparametric smoothing (formerly introduced as Adaptive weights smoothing) for varying coefficient Gaussian models on a 1D or 2D irregulat design. The function allows for a paramertic (polynomial) mean-variance dependence.
aws.irreg(y, x, hmax = NULL, aws=TRUE, memory=FALSE, varmodel = "Constant",
lkern = "Triangle", aggkern = "Uniform", sigma2 = NULL, nbins = 100,
hpre = NULL, henv = NULL, ladjust =1, varprop = 0.1, graph = FALSE)
returns anobject of class aws
with slots
y
dim(y)
x
number of observations per bin
bins where parameters have been estimated
Estimates of regression function, length: length(y)
numeric(0)
approx. variance of the estimates of the regression function. Please note that this does not reflect variability due to randomness of weights.
vector of minimal x-values (bins)
vector of maximal x-values (bins)
relative binwidths
0
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
FALSE
FALSE
varmodel
estimated coefficients in variance model
the arguments of the call to aws
The observed response vector (length n)
Design matrix, dimension n x d, d %in% 1:2
hmax
specifies the maximal bandwidth. Unit is binwidth in the first dimension.
logical: if TRUE structural adaptation (AWS) is used.
logical: if TRUE stagewise aggregation is used as an additional adaptation scheme.
determines the model that relates variance to mean. Either "Constant", "Linear" or "Quadratic".
character: location kernel, either "Triangle", "Plateau", "Quadratic", "Cubic" or "Gaussian"
character: kernel used in stagewise aggregation, either "Triangle" or "Uniform"
sigma2
allows to specify the variance in case of varmodel="Constant"
, estimated if not given.
numer of bins, can be NULL, a positive integer or a vector of positive integers (length d)
smoothing bandwidth for initial variance estimate
radius of balls around each observed design point where estimates will be calculated
factor to increase the default value of lambda
exclude the largest 100*varprop% squared residuals when estimating the error variance
If graph=TRUE
intermediate results are illustrated after each iteration step. Defaults to graph=FALSE
.
Joerg Polzehl, polzehl@wias-berlin.de
Data are first binned (1D/2D), then aws is performed on all datapoints within distance <= henv of nonempty bins.
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.
See also lpaws
, link{awsdata}
, lpaws
require(aws)
# 1D local constant smoothing
if (FALSE) demo(irreg_ex1)
# 2D local constant smoothing
if (FALSE) demo(irreg_ex2)
Run the code above in your browser using DataLab