MoMmb: Method of Moments Parameter Estimation for the MBBEFD...

mommbR Documentation

Method of Moments Parameter Estimation for the MBBEFD distribution

Description

Attempts to find the best g and b parameters which are consistent with the first and second moments of the supplied data.

Usage

mommb(x, m = FALSE, maxit = 100L, tol = NULL, na.rm = TRUE, trace = FALSE)

Arguments

x

numeric; If m is FALSE, a vector of observations between 0 and 1. If m is TRUE, then a vector of length 2, where the first element is the first central moment (mean) of the MBBEFD distribution and the second element is the second central moment (variance) of the MBBEFD distribution.

m

logical; When FALSE—the default—x is treated as a vector of observations. When TRUE, x is treated as the couplet of the distribution's first two central moments— E[X] and Var[X].

maxit

integer; maximum number of iterations.

tol

numeric; tolerance. If too tight, algorithm may fail. Defaults to the square root of .Machine$double.eps or roughly 1.49\times 10^{-8}.

na.rm

logical; if TRUE (default) NAs are removed. If FALSE, and there are NAs, the algorithm will stop with an error.

trace

logical; if TRUE, the fitting routine will print the values of g and b at each iteration i. The default is FALSE.

Details

The algorithm is based on sections 4.1 and 4.2 of Bernegger (1997). With rare exceptions, the fitted g and b parameters must conform to:

\mu = \frac{\ln(gb)(1-b)}{\ln(b)(1-gb)}

subject to:

\mu^2 \le E[x^2]\le\mu\\ p\le E[x^2]

where \mu and \mu^2 are the “true” first and second raw moments, E[x^2] is the empirical second raw moment, and p is the mass point probability of a maximal loss: 1 - F(1^{-}).

The algorithm starts with the estimate p = E[x^2] as an upper bound. However, in step 2 of section 4.2, the p component is estimated as the difference between the numerical integration of x^2 f(x) and the empirical second moment—p = E[x^2] - \int x^2 f(x) dx—as seen in equation (4.3). This is converted to g by reciprocation and convergence is tested by the difference between this new g and its prior value. If the new p \le 0, the algorithm stops with an error.

Value

Returns a list containing:

g

The fitted g parameter.

b

The fitted b parameter.

iter

The number of iterations used.

sqerr

The squared error between the empirical mean and the theoretical mean given the fitted g and b.

Note

Anecdotal evidence indicates that the results of this fitting algorithm can be volatile, especially with fewer than a few hundred observations.

Author(s)

Avraham Adler Avraham.Adler@gmail.com

References

Bernegger, S. (1997) The Swiss Re Exposure Curves and the MBBEFD Distribution Class. ASTIN Bulletin 27(1), 99–111. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2143/AST.27.1.563208")}

See Also

rmb for random variate generation.

Examples

set.seed(85L)
x <- rmb(1000, 25, 4)
mommb(x)

MBBEFDLite documentation built on Jan. 9, 2026, 1:07 a.m.