Skip to contents

E[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.

Usage

layer_third_moment(dist, limit, attachment = 0)

Arguments

dist

A severity.

limit, attachment

Layer limits and attachments.

Value

A numeric vector.

Examples

layer_third_moment(gamma_distribution(1, 2), c(3, Inf), 0)
#> [1]  9.175352 48.000000