Learn R Programming

VGAM (version 1.1-9)

frechet: Frechet Distribution Family Function

Description

Maximum likelihood estimation of the 2-parameter Frechet distribution.

Usage

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

Value

An object of class "vglmff"

(see vglmff-class). The object is used by modelling functions such as vglm

and vgam.

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.

Author

T. W. Yee

Warning

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

Details

The (3-parameter) Frechet distribution has a density function that can be written $$f(y) = \frac{sb}{ (y-a)^2} [b/(y-a)]^{s-1} \, \exp[-(b/(y-a))^s] $$ 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^2(1-1/s)]\) 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.

References

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

See Also

rfrechet, gev.

Examples

Run this code
if (FALSE) {
set.seed(123)
fdata <- data.frame(y1 = rfrechet(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)
}

Run the code above in your browser using DataLab