ecdf2 {fitteR} | R Documentation |
Calculate cumulative density
Description
Calculates the cumulative density of a set of numeric values.
Usage
ecdf2(x, y = NULL)
Arguments
x |
A numeric vector of which the ECDF should be calculated |
y |
A numeric vector. See details for explanation |
Details
This function extends the functionality of of the standard implementation of ECDF. Sometimes it is desireable to get the ECDF from pre-tabulated values. For this, elements in x and y have to be linked to each other.
Value
A list
See Also
ecdf
for the standard implementation of ECDF
Examples
x <- rnorm(1000)
e <- ecdf2(x)
str(e)
plot(e)
plot(e$x, e$cs)
x <- sample(1:100, 1000, replace=TRUE)
plot(ecdf2(x))
tab <- table(x)
x <- unique(x)
lines(ecdf2(x, y=tab), col="green")
[Package fitteR version 0.2.0 Index]