R: Local polynomial smoothing by AWS

lpaws {aws} | R Documentation

## Local polynomial smoothing by AWS

### Description

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.

### 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". 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.
`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

returns anobject of class `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), ratio of distances `wghts[-1]/wghts[1]`
`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`

### Note

If you specify `graph=TRUE` for 2D problems avoid using the default `X11()` on systems build with `cairo`, use `X11(type="Xlib")` instead (faster by a factor of 30).

### Author(s)

Joerg Polzehl polzehl@wias-berlin.de

### 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

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

[Package aws version 2.2-1 Index]