mtransform {evd} | R Documentation |
GEV Transformations
Description
Transforms to exponential margins under the GEV model.
Usage
mtransform(x, p, inv = FALSE, drp = FALSE)
Arguments
x |
A matrix with n rows and d columns, or a vector. In
the latter case, if |
p |
A vector of length three or a matrix with n rows and three columns. It can also be a list of length d, in which case each element must be a vector of length three or a matrix with n rows and three columns. |
inv |
Logical; use the inverse transformation? |
drp |
Logical; return a vector rather than a single row matrix?. Note that a single column matrix is always returned as a vector. |
Details
Let x_i
denote a vector of observations for
i = 1,\ldots,n
.
This function implements the transformation
y_{i} = \{1+s_i(x_{i}-a_i)/b_i\}_{+}^{-1/s_i}
to each column of the matrix x
.
The values (a_i,b_i,s_i)
are contained in the ith
row of the n by 3 matrix p
. If p
is a vector
of length three, the parameters are the same for every
i = 1,\ldots,n
. Alternatively, p
can be a list
with d elements, in which case the jth element is used to
transform the jth column of x
.
This function is mainly for internal use. It is used by bivariate and multivariate routines to calculate marginal transformations.
Value
A numeric matrix or vector.