akde: An adaptive KDE

View source: R/SC19043.R

akdeR Documentation

An adaptive KDE

Description

An adaptive kernel density estimator using R.

Usage

akde(x, h, kernel = "gaussian")

Arguments

x

the data from which the estimate is to be computed.

h

the bandwidth function to be used.

kernel

a character string giving the smoothing kernel to be used, with default "gaussian".

Value

x data points - same as input.

kernel name of kernel to use.

hx the bandwidth function - same as input.

h the bandwidth value at x to use.

fhat the estimated density function.

Examples

## Not run: 
x<-rnorm(2000)
h<-function(u){(10+u^4)^(-0.6)}
fhat<-akde(x,h,kernel="gaussian")
plot(x,fhat$fhat(x),cex=0.5)

## End(Not run)

SC19043/SC19043 documentation built on July 4, 2022, 10:44 p.m.