# Frechet: Create a Frechet distribution In distributions3: Probability Distributions as S3 Objects

## Description

The Frechet distribution is a special case of the \link{GEV} distribution, obtained when the GEV shape parameter ξ is positive. It may be referred to as a type II extreme value distribution.

## Usage

 1 Frechet(location = 0, scale = 1, shape = 1) 

## Arguments

 location The location (minimum) parameter m. location can be any real number. Defaults to 0. scale The scale parameter s. scale can be any positive number. Defaults to 1. shape The shape parameter α. shape can be any positive number. Defaults to 1.

## Details

We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail and much greater clarity.

In the following, let X be a Frechet random variable with location parameter location = m, scale parameter scale = s, and shape parameter shape = α. A Frechet(m, s, α) distribution is equivalent to a \link{GEV}(m + s, s / α, 1 / α) distribution.

Support: (m, ∞).

Mean: m + sΓ(1 - 1/α), for α > 1; undefined otherwise.

Median: m + s(\ln 2)^(-1/α).

Variance: s^2 [Γ(1 - 2 / α) - Γ(1 - 1 / α)^2] for α > 2; undefined otherwise.

Probability density function (p.d.f):

f(x) = (α / s) [(x - m) / s] ^ [-(1 + α)] exp{-[(x - m) / s] ^ (-α)}

for x > m. The p.d.f. is 0 for x <= m.

Cumulative distribution function (c.d.f):

F(x) = exp{-[(x - m) / s] ^ (-α)}

for x > m. The c.d.f. is 0 for x <= m.

## Value

A Frechet object.

Other continuous distributions: Beta(), Cauchy(), ChiSquare(), Erlang(), Exponential(), FisherF(), GEV(), GP(), Gamma(), Gumbel(), LogNormal(), Logistic(), Normal(), RevWeibull(), StudentsT(), Tukey(), Uniform(), Weibull()
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 set.seed(27) X <- Frechet(0, 2) X random(X, 10) pdf(X, 0.7) log_pdf(X, 0.7) cdf(X, 0.7) quantile(X, 0.7) cdf(X, quantile(X, 0.7)) quantile(X, cdf(X, 0.7))