CDF: Cumulative Distribution Function From Kernel Density Estimate

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/quantiledensity.R

Description

Given a kernel estimate of a probability density, compute the corresponding cumulative distribution function.

Usage

1
2
3
4
CDF(f, ...)

## S3 method for class 'density'
CDF(f, ..., warn = TRUE)

Arguments

f

Density estimate (object of class "density").

...

Ignored.

warn

Logical value indicating whether to issue a warning if the density estimate f had to be renormalised because it was computed in a restricted interval.

Details

CDF is generic, with a method for class "density".

This calculates the cumulative distribution function whose probability density has been estimated and stored in the object f. The object f must belong to the class "density", and would typically have been obtained from a call to the function density.

Value

A function, which can be applied to any numeric value or vector of values.

Author(s)

\spatstatAuthors

See Also

density, quantile.density

Examples

1
2
3
4
   b <- density(runif(10))
   f <- CDF(b)
   f(0.5)
   plot(f)

Example output

Loading required package: nlme
Loading required package: rpart

spatstat 1.51-0       (nickname: 'Poetic Licence') 
For an introduction to spatstat, type 'beginner' 

[1] 0.4548688

spatstat documentation built on Aug. 4, 2018, 1:04 a.m.