Description Usage Arguments Details Value Author(s) See Also Examples
This function will perform a Kernel Density Estimation
1 2 |
data |
data-frame; This is the data the distributions shall be fitted for. It must have two columns, one wih date-objects one with numeric values. |
kernel |
string; the kerel which shall be used. Can be "gaussian", "epanechnikov", "rectangular", "triangular" or "biweight". |
bandwidth |
numeric; the bandwidth for the kernel density estimation. If is null it will be determined by the unbiased cross validation using the h.ucv() function from the 'kedd' package. |
numberofdatapoints |
numeric, whole number; determines, how much datapoints shall be produced by the density() function. As can be seen in the help of density() this shall be a power of two. |
CheckData |
logical; If TRUE the function will check the data input whether it fits the requirements using the CheckData function. If FALSE it will process without, which might result in wrong results so to use the default value (TRUE) is strongly recommended. |
This function performs a simple Kernel Density estimation using the density() function. By default the bandwidth will be selected using the h.ucv() function from the 'kedd' package.
returns a lit with 5 levels: data = results of the kernel density estimation (dataframe) with sublevels 'x' and 'y',estimationmethod = 'kernel density estimation', kernel = used kernel, bandwidth = used bandwidth, startpoint = first date in the data level, endpoint = last point in data level)
Florian Berger <florian_berger@ymail.com>
1 2 3 4 5 | a <- c(1:10)
dates <- as.Date(a, origin = '2017-01-01')
count <- c(1,1,3,4,6,9,5,4,2,1)
dat <- data.frame(dates, count)
kernelest(dat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.