frechet {VGAM} | R Documentation

## Frechet Distribution Family Function

### Description

Maximum likelihood estimation of the 2-parameter and 3-parameter Frechet distribution.

### Usage

    frechet2(location=0, lscale="loge", lshape="loglog",
             escale = list(), eshape = list(),
             iscale=NULL, ishape=3, zero=NULL)
    frechet3(anchor=NULL, ldifference="loge",
             lscale="loge", lshape="loglog",
             edifference=list(), escale = list(), eshape = list(),
             ilocation=NULL, iscale=NULL, ishape=3, zero=NULL,
             effpos = .Machine$double.eps^0.75)

### Arguments

`location` | Numeric. Location parameter. It is called a below.
`lscale, lshape` | Link functions for the parameters. See `Links` for more choices.
`iscale, ishape` | Initial value for the scale and shape parameters respectively. Both parameters must be positive. A `NULL` means it is chosen internally.
`edifference, escale, eshape` | Extra argument for the respective links. See `earg` in `Links` for general information.
`zero` | An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The value must be from the set {1,2}, corresponding respectively to scale and shape. By default all linear/additive predictors are modelled as a linear combination of the explanatory variables.
`anchor` | An ``anchor'' point for estimating the location parameter. This must be a value no greater than `min(y)` where `y` is the response. The location parameter is A - D where A is the anchor, D is the ``difference'' (default is to make this positive). The default value of `anchor` means `min(y)` is chosen.
`ldifference` | Parameter link function for the difference D between the anchor point and the location parameter estimate. The default keeps this difference positive so that numerical problems are less likely to occur.
`ilocation` | Optional initial value for the location parameter. A good choice can speed up the convergence rate markedly. A `NULL` means it is chosen internally.
`effpos` | A small number, usually positive, to pass into the quasi-Newton updating function. A value greater than `effpos` is considered effectively positive.

### Details

The Frechet distribution has a density function that can be written

f(y) = ((s*b) / (y-a)^2) * exp[-(b/(y-a))^s] * [b/(y-a)]^(s-1)

for y>a and scale parameter b>0. The positive shape parameter is s. The cumulative distribution function is

F(y) = exp[-(b/(y-a))^s].

The mean of Y is a + b*gamma(1-1/s) for s>1 (these are returned as the fitted values). Note that the `loglog` link ensures s>1. The variance of Y is b^2 * [gamma(1-2/s) - gamma(1-1/s)^2] for s>2.

`frechet2` has a known whereas `frechet3` estimates it. Estimating a well requires a lot of data and a good choice of `ilocation` will help speed up convergence. For `frechet3` the default linear/additive predictors are log(D), log(b), log(log(s)), respectively. It would be great if the first linear/additive predictor was a direct function of the location parameter, but this can run the risk that the estimate is out of range (i.e., greater than `min(y)`).

### Value

An object of class `"vglmff"` (see `vglmff-class`). The object is used by modelling functions such as `vglm` and `vgam`.

### Warning

Convergence for `frechet3` can be very slow, especially if the initial value for the location parameter is poor. Setting something like `maxit=200, trace=TRUE` is a good idea.

### Note

These family functions use the BFGS quasi-Newton update formula for the working weight matrices. Consequently the estimated variance-covariance matrix may be inaccurate or simply wrong! The standard errors must be therefore treated with caution; these are computed in functions such as `vcov()` and `summary()`.

If `fit` is a `frechet3` fit then `fit@extra$location` is the final estimate of the location parameter, and `fit@extra$LHSanchor` is the anchor point.

### Author(s)

T. W. Yee

### References

Castillo, E., Hadi, A. S., Balakrishnan, N. Sarabia, J. S. (2005) Extreme Value and Related Models with Applications in Engineering and Science, Hoboken, N.J.: Wiley-Interscience.

### See Also

`rfrechet`.

### Examples

    y = rfrechet(n <- 1000, shape=exp(exp(0)))
    ## Not run: hist(y)
    fit2 = vglm(y ~ 1, frechet2, trace=TRUE, maxit=155)
    fit3 = vglm(y ~ 1, frechet3(ilocation=0), trace=TRUE, maxit=155)
    coef(fit3, matrix=TRUE)
    Coef(fit3)
    head(fitted(fit3))
    mean(y)
    head(weights(fit3, type="w"))
    vcov(fit3)   # caution needed!
    head(fit3@extra$location)  # Estimate of the location parameter
    fit3@extra$LHSanchor       # Anchor point
    min(y)

[Package VGAM version 0.7-9 Index]