Learn R Programming

HyRiM (version 1.0.3)

cdf: (cumulative) loss distribution function

Description

returns the numeric values of the cumulative loss distribution ld evaluated at x, i.e., \(\textrm{Pr}(X \leq x)\), where \(X\sim \textrm{ld}\).

Usage

cdf(ld, x)

Arguments

ld

the loss distribution as obtained from lossDistribution or mgss.

x

the point at which the distribution function shall be evaluated (must be a numeric; vectors are not supported yet)

Value

an approximation for the probability Pr(ld<=x).

Details

the function internally distinguishes discrete and continous disributions only in terms of rounding its argument to the largest integer less than x. Its value is obtained by numeric integration of the internal representation of the loss distribution (in the continuous case).

For discrete distributions, the function works on the internal probability mass function (which may be different from the empirical distribution in case that the loss distribution has been smoothed during its construction; see lossDistribution).

See Also

suitable inputs for this function are provided by lossDistribution and mgss.

Examples

Run this code
# NOT RUN {
cvss1base <- c(10,6.4,9,7.9,7.1,9)
ld <- lossDistribution(cvss1base)
cdf(ld, 4)
# }

Run the code above in your browser using DataLab