density.estimate: Density estimate

Description Usage Arguments Value Author(s) Examples

Description

Estimate the density of a variable, either using the naive estimator og the Gaussian kernel estimator.

Usage

1
density.estimate(x, d, h, method)

Arguments

x

is a numeric variable.

d

is a point to obtain the density. d has to be a positive integer.

h

is bandwith. h has to be a positive numeric.

method

is either the naive estimator or the Gaussian kernel estimator. The default is the naive estimator.

Value

If d is given, it returns the density for the point d. If d is not given, it returns a list containing the density to the following points: min, 1st quartile, median, mean, 3rd qurtile and max.

Author(s)

Tobias Mortensen
Department of mathematics and computer science (IMADA)
University of southern Denmark, Odense
tomor14@student.sdu.dk

Examples

1
density.estimate(x=cars$dist, d=4, h=.8, method="naive")

tomor14/Examst522 documentation built on May 31, 2019, 6:20 p.m.