Description Usage Arguments Value Author(s) Examples
This function takes between 1 and 4 arguments to estimate density of data.
1 | dens.estimator(x,d,h,method="naive")
|
x |
is data given as a vector of numbers, to estimate density from. |
d |
is a number or a vector of numbers, that specifies what points density should be returned for. If nothing is chosen, a table of relevant values are given: Min, 1st quantile, median, mean, 3rd quantile and max of the input data x. |
h |
is a positive number that specifies the bandwidth used for the density estimation. If nothing is chosen, h is estimated using either Struges method or Silverman's method, depending on the method parameter. |
method |
is an argument that is either "naive" or "kernel", deciding the method of estimating the density. Defaults to "naive". |
Depending on input, either returns density on specific points d, or returns a bandwidth as well as a table of densities estimated at points on data given as: minimum, 1st quantile, median, mean, 3rd quantile, and maximum of x.
Nguyen Khanh Le Ho & Emil H. Andersen
Department of Mathematics and Computer Science (IMADA)
University of Southern Denmark, Denmark
emila14@student.sdu.dk
ngho14@student.sdu.dk
1 2 3 | dens.estimator(cars$speed)
dens.estimator(cars$speed,method="kernel")
dens.estimator(cars$speed,10,3,method="naive")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.