Learn R Programming

Renext (version 3.0-0)

fmaxlo: ML estimation of a 'maxlo' distribution

Description

Fast Maximum Likelihood estimation of a 'maxlo' distribution.

Usage

fmaxlo(x,
       shapeMin = 1.25,
       info.observed = FALSE,
       plot = FALSE,
       scaleData = TRUE,
       cov = TRUE)

Arguments

x
Sample vector to be fitted. Should contain only positive non-NA values.
shapeMin
Lower bound on the shape parameter. This must be >= 1.0 since otherwise the ML estimate is obtained with the scale parameter equal to max(x).
info.observed
Should the observed information matrix be used or the expected one be used?
plot
Logical. If TRUE, a plot will be produced showing the derivative of the concentrated log-likelihood, function of the shape parameter. The derivative function shown is that of the log-likelihood for the unconstrained maximisation;
scaleData
Logical. If TRUE observations in x (which are positive) are divided by their mean value. The results are in theory not affected by this transformation, but scaling the data could improve the estimation in some cases.
cov
Logical. If FALSE, a minimal estimation is performed with no covariance matrix or derivative returned. This can be useful when a large number of ML estimations are required, e.g. to sample from a likelihood ratio.

Value

  • A list with the following elements
  • estimateParameter ML estimates.
  • sdVector of (asymptotic) standard deviations for the estimates.
  • loglikThe maximised log-likelihood.
  • dloglikGradient of the log-likelihood at the optimum. Its two elements should normally be close to zero.
  • covThe (asymptotic) covariance matrix computed from theoretical or observed information matrix.
  • infoThe information matrix.

Details

The 'maxlo' likelihood is concentrated with respect to the shape parameter, thus the function to be maximised has only one one scalar argument: the scale parameter $\beta$. For large scale $\beta$, the derivative of the concentrated log-likelihood tends to zero, and its sign is that of $(\textrm{CV}^2-1)$ where $\textrm{CV}$ is the coefficient of variation, computed using $n$ as denominator in the formula for the standard deviation. The ML estimate does not exist when the sample has a coefficient of variation CV greater than 1.0 and it may fail to be found when CV is smaller than yet close to 1.0. The covariance matrix can be computed by using the expected information matrix and by noticing that when the r.v. $Y$ follows the 'maxlo' distribution with shape $\alpha$ and scale $\beta$ the r.v $V:= 1/(1-Y/\beta)$ follows a Pareto distribution with minimum 1 and and shape parameter $\alpha$. The information matrix involves the second order moment of $V$.

See Also

Maxlo for the description of the distribution.

Examples

Run this code
## generate sample
set.seed(1234)
n <- 200
alpha <- 2 + rexp(1)
beta <- 1 + rexp(1)
x <- rmaxlo(n, scale = beta, shape = alpha)
res <- fmaxlo(x, plot = TRUE)

## compare with a GPD with shape 'xi' and scale 'sigma'
xi <- -1 / alpha; sigma <- -beta * xi
res.evd <- evd::fpot(x, threshold = 0, model = "gpd")
xi.evd <- res.evd$estimate["shape"]
sigma.evd <- res.evd$estimate["scale"]
beta.evd <- -sigma.evd / xi.evd 
alpha.evd <- -1 / xi.evd
cbind(Renext = res$estimate, evd = c(alpha = alpha.evd, beta = beta.evd))

Run the code above in your browser using DataLab