Skip to contents

Computes f-hat(x) equal to one over n times h times the sum over i of K of (x minus X_i) divided by h.

Usage

kde(x, x_eval, bandwidth, kernel_type = KERNEL_GAUSSIAN)

Arguments

x

Numeric data vector.

x_eval

Evaluation grid.

bandwidth

Positive bandwidth.

kernel_type

Integer code or kernel name.

Value

Numeric vector of estimated densities.

References

Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman and Hall.