wecdf: Weighted empirical cumulative distribution function

Description Usage Arguments Details Value Examples

Description

Calculate the values of the weighted empirical cumulative distribution function for a given vector of data

Usage

1
wecdf(X, x, weights = rep(1, length(X)))

Arguments

X

the vector of data to create the wecdf.

x

the vector of data that you want the corresponding wecdf values.

weights

the weights applicated to the vector X.

Details

Give the value of the wecdf. If the weights are 1 (the default value), the wecdf become the ecdf of X.

Value

Return a vector of the wecdf values corresponding to x given a reference vector X with weights weights.

Examples

1
2
3
4
5
6
7
X <- rpareto(10)
x <- seq(0.8, 50, 0.01)
plot(x, wecdf(X, x, rep(1,length(X))))

#to compare with the ecdf function
f <- ecdf(X)
lines(x, f(x), col = "red", type = "s")

extremefit documentation built on May 6, 2019, 1:10 a.m.

Related to wecdf in extremefit...