bw.dboot2: A bootstrap bandwidth selection with resampling In decon: Deconvolution Estimation in Measurement Error Models

Description

To compute the optimal bandwidth using the bootstrap method with resampling.

Usage

 `1` ``` bw.dboot2(y,sig,h0='dboot1',error='normal',B=1000,grid=100,ub=2) ```

Arguments

 `y` The observed data. It is a vector of length at least 3. `sig` The standard deviation(s) σ. For homoscedastic errors, sig is a single value. Otherwise, sig is a vector of variances having the same length as y. `h0` An initial bandwidth parameter. The default vaule is the estimate from bw.dboot1. `error` Error distribution types: 'normal', 'laplacian' for normal and Laplacian errors, respectively. `B` Bootstrap number, default value 1000. `grid` the grid number to search the optimal bandwidth when a bandwidth selector was specified in bw. Default value "grid=100". `ub` the upper boundary to search the optimal bandwidth, default value is "ub=2".

Details

Three cases are supported: (1) homo normal; (2) homo laplacian.

The integration was approximated by computing the average over a fine grid of points (1000 points).

Value

the selected bandwidth.

Author(s)

X.F. Wang [email protected]

B. Wang [email protected]

References

Wang, X.F. and Wang, B. (2011). Deconvolution estimation in measurement error models: The R package decon. Journal of Statistical Software, 39(10), 1-24.

`bw.dnrd`, `bw.dmise`, `bw.dboot1`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```n <- 1000 x <- c(rnorm(n/2,-2,1),rnorm(n/2,2,1)) ## the case of homoscedastic normal error sig <- .8 u <- rnorm(n, sd=sig) w <- x+u bw.dboot2(w,sig=sig) ## the case of homoscedastic laplacian error sig <- .8 ## generate laplacian error u <- ifelse(runif(n) > 0.5, 1, -1) * rexp(n,rate=1/sig) w <- x+u bw.dboot2(w,sig=sig,error='laplacian') ```