Third moment of a layer
layer_third_moment.RdE[min(max(X - attachment, 0), limit)^3] for any severity, by quadrature
of its survival function (relative accuracy about 1e-10): limit = Inf
for the unlimited layer, attachment = 0 for the limited third moment
E[min(X, limit)^3]. Limits and attachments are recycled.
Examples
layer_third_moment(gamma_distribution(1, 2), c(3, Inf), 0)
#> [1] 9.175352 48.000000