Learn R Programming

bda (version 3.1.3-2)

edf: To compute the empirical distribution function.

Description

To compute the empirical distribution function.

Usage

edf(x, weights, freq, from, to, gridsize, digits=0,
                rounding)

Arguments

x
A sample. 'NA' values will be automatically removed.
weights
A vector of weights of x
freq
A vector of frequencies of x
from,to,gridsize
start point, end point and size of a fine grid where the EDF will be evaluated.
digits
integer indicating the number of decimal places that x will be rounded to. Negative values are allowed. A negative number of digits means rounding to a power of ten, so for example digits = -2 rounds to the nearest hund
rounding
Rounding method. Options include nearest, up, down, or none.

Examples

Run this code
x = c(1:10)
(out = edf(x))
plot(out,ylim=c(0,1))
(out2 = edf(x, gridsize=15))
lines(out2, col=2)

Run the code above in your browser using DataLab