Compute a weighted version of the empirical cumulative distribution function.
Numeric vector of observations.
Numeric vector of non-negative weights
This is a modification of the standard function
allowing the observations
x to have weights.
The weighted e.c.d.f. (empirical cumulative distribution function)
Fn is defined so that, for any real number
y, the value of
Fn(y) is equal to the total weight of all entries of
x that are less than or equal to
y. That is
Fn(y) = sum(weights[x <= y]).
Fn is a step function which jumps at the
x. The height of the jump at a point
is the total weight of all entries in
number of tied observations at that value. Missing values are
weights is omitted, the default is equivalent to
ecdf(x) except for the class membership.
The result of
ewcdf is a function, of class
inheriting from the classes
ewcdf has methods for
The inherited class
has methods for
A function, of class
"ewcdf", inheriting from
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.