bw.dmise: The MISE based plug-in bandwidth selection

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

View source: R/bwdmise.R

Description

To compute the optimal bandwidth using the plug-in methods by minimizing MISE.

Usage

1
 bw.dmise(y,sig,error="normal",kernel="support",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.

error

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

kernel

Kernel type: 'support' for support kernel; and 'normal' for Gaussian kernel.

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

The current version approximate the second term in the MISE by assuming that X is normally distributed.

Value

the selected bandwidth.

Author(s)

X.F. Wang wangx6@ccf.org

B. Wang bwang@jaguar1.usouthal.edu

References

Fan, J. (1992). Deconvolution with supersmooth distributions. The Canadian Journal of Statistics, 20, 155-169.

Stefanski, L. and Carroll, R. J. (1990). Deconvoluting kernel density estimators. Statistics, 21, 169-184.

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.dboot1, bw.dboot2.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.dmise(w,sig=sig,error='normal');
## The small error case
sig <- .25
u <- rnorm(n, sd=sig)
w <- x+u
bw.dmise(w,sig=sig,kernel='normal',error='normal');

## 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.dmise(w,sig=sig,error='laplace')

## the case of heteroscedastic normal error
sig <- runif(n, .7, .9)
u <- sapply(sig, function(x) rnorm(1, sd=x))
w <- x+u
bw.dmise(w,sig=sig,kernel='support',error='normal')

decon documentation built on Oct. 21, 2021, 1:07 a.m.

Related to bw.dmise in decon...