spunif: Semi-parametric marginal transformation to uniform

View source: R/spunif.R

spunifR Documentation

Semi-parametric marginal transformation to uniform

Description

The function spunif transforms a matrix or vector of data x to the pseudo-uniform scale using a semiparametric transform. Data below the threshold are transformed to pseudo-uniforms using a rank transform, while data above the threshold are assumed to follow a generalized Pareto distribution. The parameters of the latter are estimated using maximum likelihood if either scale = NULL or shape = NULL.

Usage

spunif(x, thresh, scale = NULL, shape = NULL)

Arguments

x

matrix or vector of data

thresh

vector of marginal thresholds

scale

vector of marginal scale parameters for the generalized Pareto

shape

vector of marginal shape parameters for the generalized Pareto

Value

a matrix or vector of the same dimension as x, with pseudo-uniform observations

Author(s)

Leo Belzile

Examples

x <- rmev(1000, d = 3, param = 2, model = 'log')
thresh <- apply(x, 2, quantile, 0.95)
spunif(x, thresh)

mev documentation built on April 20, 2023, 5:10 p.m.