Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

edf

Empirical Distribution Function


Description

This function calculates the empirical distribution function at each element of a vector of observations.

Usage

edf(v, adjust = FALSE)

Arguments

v

vector, observations of length n.

adjust

logical, adjustment of denominator to be (n + 1).

Value

vector

Examples

data(smi)
data(ftse100)
s1 <- window(ftse100, "1990-11-09", "2004-03-25")
s1a <- alignDailySeries(s1)
s2a <- alignDailySeries(smi)
idx <- merge(s1a, s2a)
r <-returns(idx)
rp <- series(window(r, "1994-01-01", "2003-12-31"))
rp <- rp[(rp[, 1] != 0) & (rp[, 2] !=0), ]
Udata <- apply(rp, 2, edf, adjust = 1)
plot(Udata)

QRM

Provides R-Language Code to Examine Quantitative Risk Management Concepts

v0.4-31
GPL (>= 2)
Authors
Bernhard Pfaff [aut, cre], Marius Hofert [ctb], Alexander McNeil [aut] (S-Plus original (QRMlib)), Scott Ulmann [trl] (First R port as package QRMlib)
Initial release
2020-02-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.