Learn R Programming

ExtremalDep (version 1.0.0)

trans2UFrechet: Transformation to Unit Frechet Distribution

Description

Empirical and parametric transformation of a dataset to unit Frechet marginal distribution.

Usage

trans2UFrechet(data, pars, type = "Empirical")

Value

An object of the same format and dimensions as data.

Arguments

data

A vector of length \(n\) or a \((n \times p)\) matrix representing the data on its original scale.

pars

A \((1 \times 3)\) vector or a \((p \times 3)\) matrix of marginal GEV parameters. Required when type = "GEV".

type

A character string indicating the type of transformation. Can be "Empirical" or "GEV".

Details

When type = "Empirical", the transformation is \( t(x) = -1 / \log(F_{\textrm{emp}}(x)) \) where \(F_{\textrm{emp}}(x)\) denotes the empirical cumulative distribution function.

When type = "GEV", the transformation is \( \left(1 + \xi \frac{x-\mu}{\sigma}\right)^{1/\xi} \) if \(\xi \neq 0\), and \( \sigma / (x-\mu) \) if \(\xi = 0\). If pars is missing, a GEV is fitted on the columns of data using the fGEV function.

See Also

trans2GEV, fGEV

Examples

Run this code
data(MilanPollution)

pars <- fGEV(Milan.winter$PM10)$est

data_uf <- trans2UFrechet(data = Milan.winter$PM10, pars = pars, type = "GEV")
fGEV(data_uf)$est

data_uf2 <- trans2UFrechet(data = Milan.winter$PM10, type = "Empirical")
fGEV(data_uf2)$est

Run the code above in your browser using DataLab