Kernel: Kernel density estimation.

Description Usage Arguments Value Examples

View source: R/Kernel.R

Description

This function calculates the kernel density estimates of x with kernel choice kernel and bandwidth h. If the number of covariates is large, higher order kernels are recommended.

Of limited interest to most users; function Kernel() would typically be called by some other functions.

Usage

1
Kernel(x,h,kernel='gaussian')

Arguments

x

Data matrix or data vector to calculate the kernel estimate.

h

The bandwidth to be used.

kernel

Type of kernel. kernel can be chosen from 'gaussian','gaussian4','gaussian6','gaussian8','gaussian10','epanechnikov','uniform','triangular','triweight','tricube','biweight',cosine','silverman'

Value

A vector of the estimated density values.

Examples

1
Kernel(x=cbind(runif(10),rnorm(10)),h=1/10,kernel='gaussian')

lakerwsl/WUNT documentation built on Sept. 13, 2020, 12:15 a.m.