RegioGEV: Regional (or local) parameter and quantile estimation

Description Usage Arguments Details Value Examples

View source: R/regional_gev.R

Description

Calculates regional (or local) parameters of a generalized extreme value (GEV) distribution using (trimmed) L-moments (see TLMoments and parameters) from a vector or matrix of observation. Based on these parameters, a p-quantile of the GEV will be calculated for the jth station.

Usage

1
RegioGEV(x, p, j = 1, leftrim = 0, rightrim = 0, na.rm = TRUE, ...)

Arguments

x

vector or matrix of observations (rows: observations, d columns: stations).

p

a probability.

j

quantile and parameter estimation for the jth station (jth column of x). Irrelevant if is x is a vector.

leftrim

integer indicating lower trimming parameter (≥ 0).

rightrim

integer indicating upper trimming parameter (≥ 0).

na.rm

Should missing values be removed?

...

additional arguments, see TLMoments.

Details

The optimal weights will be calculated as described in "Kinsvater, Fried and Lilienthal (2015): Regional extreme value index estimation and a test of tail homogeneity, Environmetrics, DOI: 10.1002/env.2376, Section 3.2". If it's not possible to calculate optimal weights (negative eigenvaules of an estimated covarinace matrix), simple weights will be calculated: w_j=n_j/sum_{j=1}^d n_j

Value

List of

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library("evd")
# sample observations of 75 years at one station:
x <- rgev(75) # x is a vector
RegioGEV(x=x, p=0.95)

x2 <- c(NA, NA, x[1:60], NA, x[61:75]) # vector of observations with missing values
RegioGEV(x=x2, p=0.95) # NAs will be removed

# sample observations of 100 years at 4 stations:
set.seed(1053)
x <- matrix(rgev(400, 2, 1, 0.3), ncol=4)
RegioGEV(x=x, p=0.9, j=3, leftrim=0, rightrim=0) # optimal weighting
RegioGEV(x=x, p=0.9, j=3, leftrim=0, rightrim=1) # optimal weighting

# With missing values:
x2 <- x
x2[c(54, 89, 300)] <- NA
RegioGEV(x=x2, p=0.9, j=3, leftrim=0, rightrim=0)

# sample again observations of 100 years at 4 stations:
set.seed(958)
x <- matrix(rgev(400, 2, 1, 0.3), ncol=4)
RegioGEV(x=x, p=0.9, j=3, leftrim=0, rightrim=0) # simple weighting

flood documentation built on May 30, 2017, 8:25 a.m.