Empirical cumulative density function estimation

Description

Provide empirical cumulative density function (CDF) estimation of a sample vector xx at a point c_0.

Usage

1
  empirical.cdf(xx, c0)  

Arguments

xx

A numeric vector, sample data.

c0

A numerical value, the value at which the CDF will be estimated.

Details

The CDF of xx at c0 is estimated as ∑{I_{(xx ≤ c_0)}/n} where n is the length of xx and I(.) is the indicator function giving 1 if the criterion in the bracket is satisfied and 0 otherwise.

Value

Return a numerical value indicating the cumulative probability of xx at c_0 by empirical CDF method.

Author(s)

Jingqin Luo

See Also

KernelSmoothing.cdf Youden3Grp

Examples

1
2
3
x <- rnorm(100)

res <- empirical.cdf(xx=x,c0=0.5)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.