Learn R Programming

HyRiM (version 2.0.2)

moment: compute moments of loss distributions

Description

the moment of given order k is computed by numeric integration or summation (in case of discrete distributions)

Usage

moment(ld, k)

Value

the k-th order moment of the given loss distribution

Arguments

ld

the loss distribution as obtained from lossDistribution or mgss.

k

the order of the moment (must be an integer \(\geq 1\))

Author

Stefan Rass

See Also

the methods mean and variance are based on this function.

Examples

Run this code
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