Skip to contents

Uses Newton-Raphson to estimate the parameters of the Gompertz distribution.

Usage

mlgompertz(x, na.rm = FALSE, ...)

Arguments

x

a (non-empty) numeric vector of data values.

na.rm

logical. Should missing values be removed?

...

reltol is the relative accuracy requested, defaults to .Machine$double.eps^0.25. iterlim is a positive integer specifying the maximum number of iterations to be performed before the program is terminated (defaults to 100).

Value

mlgompertz returns an object of class univariateML. This is a named numeric vector with maximum likelihood estimates for a and b and the following attributes:

model

The name of the model.

density

The density associated with the estimates.

logLik

The loglikelihood at the maximum.

support

The support of the density.

n

The number of observations.

call

The call as captured my match.call

Details

For some data sets the maximum likelihood estimator of b fails to exist since the root of the profile maximum likelihood equation is non-positive. The value 1e-06 is returned in this case, along with a warning.

For the density function of the Gompertz distribution see Gompertz.

References

Lenart, A. (2012). The Gompertz distribution and Maximum Likelihood Estimation of its parameters - a revision. MPIDR WORKING PAPER WP 2012-008. https://www.demogr.mpg.de/papers/working/wp-2012-008.pdf

See also

Gompertz for the Gompertz density.

Examples

mlgompertz(precip)
#> Maximum likelihood estimates for the Gompertz model 
#>        a         b  
#> 0.004121  0.071110