moment | R Documentation |
the moment of given order k is computed by numeric integration or summation (in case of discrete distributions)
moment(ld, k)
ld |
the loss distribution as obtained from |
k |
the order of the moment (must be an integer ≥q 1) |
the k-th order moment of the given loss distribution
In case of continuous distributions, the value returned is an approximation and based on the internal kernel density approximation.
For categorical 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
).
In its current version, cdf
does not vectorize, i.e., cannot be applied to vector arguments x
.
Stefan Rass
the methods mean
and variance
are based on this function.
cvss1base <- c(10,6.4,9,7.9,7.1,9) ld <- lossDistribution(cvss1base) cdf(ld, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.