cdf: (cumulative) loss distribution function

View source: R/cdf.R

cdfR Documentation

(cumulative) loss distribution function

Description

returns the numeric values of the cumulative loss distribution ld evaluated at x, i.e., \textrm{Pr}(X ≤q 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)

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).

Value

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

Note

in its current version, cdf does not vectorize, i.e., cannot be applied to vector arguments x.

Author(s)

Stefan Rass

See Also

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

Examples

cvss1base <- c(10,6.4,9,7.9,7.1,9)
ld <- lossDistribution(cvss1base)
cdf(ld, 4)

HyRiM documentation built on Dec. 9, 2022, 1:08 a.m.