KDER: A kernel density estimator using R

Description Usage Arguments Value Examples

View source: R/KDER.R

Description

A function for estimating the density function of a given set of data using R

Usage

1
KDER(X, h, x)

Arguments

X

the given set of data of one-dimension

h

the bandwidth

x

the estimated density function value where you want to know

Value

the estimated density function value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
X <- rnorm(100)
x <- seq(-1, 1, by = 0.01)
h <- 0.1
for(i in 1:length(x)){
  y[i] <- KDER(X, h, x[i])
  }
plot(x, y, type="l")

## End(Not run)

SC19020/SC19020 documentation built on Jan. 3, 2020, 12:09 a.m.