MoMmb function

Method of Moments Parameter Estimation for the MBBEFD distribution

Method of Moments Parameter Estimation for the MBBEFD distribution

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

mommb(x, maxit = 100L, tol = .Machine$double.eps ^ 0.5, na.rm = TRUE)

Arguments

  • x: numeric ; vector of observations between 0 and 1.
  • 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.49e81.49e-8.
  • na.rm: logical ; if TRUE (default) NAs are removed. If FALSE, and there are NAs, the algorithm will stop with an error.

Details

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

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

subject to:

μ2E[x2]μpE[x2]μ2<=E[x2]<=μ\p<=E[x2] \mu^2 \le E[x^2]\le\mu\\ p\le E[x^2]\mu^2 <= E[x^2] <= \mu\p<= E[x^2]

where μ\mu and μ2\mu^2 are the true first and second moments and E[x2]E[x^2] is the empirical second moment.

The algorithm starts with the estimate p=E[x2]p = E[x^2] as an upper bound. However, in step 2 of section 4.2, the pp component is estimated as the difference between the numerical integration of x2f(x)x^2 f(x) and the empirical second moment---p=E[x2]x2f(x)dxp = E[x^2] - \int x^2 f(x) dx---as seen in equation (4.3). This is converted to gg by reciprocation and convergence is tested by the difference between this new gg and its prior value. If the new p0p \le 0, the algorithm attempts to restart with a larger gg---a smaller pp. In this case, the algorithm tends to fail to converge.

Returns

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.

References

Bernegger, S. (1997) The Swiss Re Exposure Curves and the MBBEFD

Distribution Class. ASTIN Bulletin 27 (1), 99--111. tools:::Rd_expr_doi("10.2143/AST.27.1.563208")

Author(s)

Avraham Adler Avraham.Adler@gmail.com

See Also

rmb for random variate generation.

Examples

set.seed(85L) x <- rmb(1000, 25, 4) mommb(x)
  • Maintainer: Avraham Adler
  • License: MPL-2.0
  • Last published: 2025-01-31