Learn R Programming

DiagTest3Grp (version 1.6)

empirical.cdf: Empirical cumulative density function estimation

Description

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

Usage

empirical.cdf(xx, c0)

Arguments

xx
A numeric vector, sample data.
c0
A numerical value, the value at which the CDF will be estimated.

Value

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

Details

The CDF of xx at c0 is estimated as $\sum{I_{(xx \le 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.

See Also

KernelSmoothing.cdf Youden3Grp

Examples

Run this code

x <- rnorm(100)

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

Run the code above in your browser using DataLab