bw.dboot1: A bootstrap bandwidth selection without resampling

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

To compute the optimal bandwidth using the bootstrap-type method without generation of any bootstrap sample.

Usage

1
 bw.dboot1(y,sig, h0="dnrd", error="normal", 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.dnrd.

error

Error distribution types: 'normal', 'laplacian' for normal and Laplacian errors, respectively.

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; (3) hetero normal.

Case (3) could be very slow, we reduce the number of grid points in computing the L-2 distance to 100 and reduce the optimal bandwidth searching grid points to 50 to speed up the algorithm.

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

The case of heteroscedastic laplacian errors is not supported and is to be developed.

Value

the selected bandwidth.

Author(s)

X.F. Wang wangx6@ccf.org

B. Wang bwang@jaguar1.usouthal.edu

References

Delaigle, A. and Gijbels, I. (2004). Practical bandwidth selection in deconvolution kernel density estimation. Computational Statistics and Data Analysis, 45, 249-267.

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.

See Also

bw.dnrd, bw.dmise, bw.dboot2.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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.dboot1(w,sig=sig)
## the case of homoscedastic laplacian error
sig <- .8
## generate laplacian errors
u <- ifelse(runif(n) > 0.5, 1, -1) * rexp(n,rate=1/sig)
w <- x+u
bw.dboot1(w,sig=sig,error='laplacian')
## the case of heteroscedastic normal error
sig <- runif(n, .7, .9)
u <- sapply(sig, function(x) rnorm(1, sd=x))
w <- x+u
bw.dboot1(w,sig=sig,error='normal')

XFW/decon documentation built on May 9, 2019, 11:04 p.m.