Learn R Programming

rlcv (version 1.0.0)

kde_d: Multivariate kernel density

Description

Multivariate kernel density

Usage

kde_d(x.obs, x.new = NULL, h, stud = FALSE)

Arguments

x.obs

Training (observed) data (n1 by d matrix, d>=2)

x.new

Evaluation data (n2 by d matrix, d>=2); default to x.obs

h

Bandwidth (d vector)

stud

Indicator for whether data are studentized; default to FALSE

Value

Density evaluated at x.new

Details

For multivariate distributions, bandwidth is calculated for studentized data.

References

Wu, Ximing (2019), "Robust Likelihood Cross Validation for Kernel Density Estimation," Journal of Business and Economic Statistics, 37(4): 761-770.

Examples

Run this code
# NOT RUN {
x=matrix(rnorm(200),ncol=2)
x.new=matrix(rnorm(100),ncol=2)
h=c(1,1)
f=kde_d(x.new=x.new,x.obs=x,h=h)
# }

Run the code above in your browser using DataLab