Learn R Programming

NPsimex (version 0.2-1)

lambda.select: A rule of thumb lambda_1 selection in density estimation with SIMEX

Description

To compute the lambda_1 using the rule-of-thumb methods.

Usage

lambda.select(W,msigma, method="SJ", na.rm = FALSE, ...)

Arguments

W
The observed data. It is a vector of length at least 10.
msigma
The standard deviation $\sigma$ of measurement error. It is a single positive numeric value.
method
Specifies the bandwidth of 'W'. It can be a single numeric value which has been pre-determined; or computed with the specific density bandwidth selector: 'nrd0', 'nrd', 'ucv', 'bcv', 'SJ'.
na.rm
is set to FALSE by default: no NA value is allowed.
...
control

Value

Details

References

Wang, X.F., Sun, J. and Fan, Z. (2011). Deconvolution density estimation with heteroscedastic errors using SIMEX.

See Also

simex.density, simex.H.density.

Examples

Run this code

N <- 1000
set.seed(123); X <- c(rnorm(N/2, mean=-2), rnorm(N/2,mean=2)); U <- rnorm(N,sd=1)
msigma <- 0.5
#msigma <- runif(N,min=0.3,max=0.5)
W <- X + msigma*U
lambda1 <- lambda.select(W, msigma=msigma)

Run the code above in your browser using DataLab