# frechet: Frechet Distribution Family Function In VGAM: Vector Generalized Linear and Additive Models

## Description

Maximum likelihood estimation of the 2-parameter Frechet distribution.

## Usage

 ```1 2``` ```frechet(location = 0, lscale = "loglink", lshape = logofflink(offset = -2), iscale = NULL, ishape = NULL, nsimEIM = 250, zero = NULL) ```

## Arguments

 `location` Numeric. Location parameter. It is called a below. `lscale, lshape` Link functions for the parameters; see `Links` for more choices. `iscale, ishape, zero, nsimEIM` See `CommonVGAMffArguments` for information.

## Details

The (3-parameter) 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). The variance of Y is b^2 * [gamma(1 - 2/s) - gamma(1 - 1/s)^2] for s > 2.

Family `frechet` has a known, and log(b) and log(s - 2) are the default linear/additive predictors. The working weights are estimated by simulated Fisher scoring.

## Value

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

## Warning

Family function `frechet` may fail for low values of the shape parameter, e.g., near 2 or lower.

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, NJ, USA: Wiley-Interscience.

`rfrechet`, `gev`.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```## Not run: set.seed(123) fdata <- data.frame(y1 = rfrechet(nn <- 1000, shape = 2 + exp(1))) with(fdata, hist(y1)) fit2 <- vglm(y1 ~ 1, frechet, data = fdata, trace = TRUE) coef(fit2, matrix = TRUE) Coef(fit2) head(fitted(fit2)) with(fdata, mean(y1)) head(weights(fit2, type = "working")) vcov(fit2) ## End(Not run) ```

### Example output ```Loading required package: stats4
VGLM    linear loop  1 :  loglikelihood = -234.51152
VGLM    linear loop  2 :  loglikelihood = -142.3688
VGLM    linear loop  3 :  loglikelihood = -134.8156
VGLM    linear loop  4 :  loglikelihood = -134.77484
VGLM    linear loop  5 :  loglikelihood = -134.77482
VGLM    linear loop  6 :  loglikelihood = -134.77482
loge(scale) logoff(shape, offset = -2)
(Intercept) -0.002031548                   1.013375
scale     shape
0.9979705 4.7548828
[,1]
[1,] 1.173629
[2,] 1.173629
[3,] 1.173629
[4,] 1.173629
[5,] 1.173629
[6,] 1.173629
 1.171643
[,1]      [,2]     [,3]
[1,] 22.60561 0.6056725 1.168047
[2,] 22.60561 0.6056725 1.168047
[3,] 22.60561 0.6056725 1.168047
[4,] 22.60561 0.6056725 1.168047
[5,] 22.60561 0.6056725 1.168047
[6,] 22.60561 0.6056725 1.168047
(Intercept):1 (Intercept):2
(Intercept):1  4.913277e-05 -9.475318e-05
(Intercept):2 -9.475318e-05  1.833790e-03
```

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.