RegioGEVSeas: Seasonal regional (or local) parameter and quantile...

Description Usage Arguments Value Examples

View source: R/regional_gev.R

Description

Calculates regional (or local) parameters of a two-component GEV distribution (product of two GEVs) using (trimmed) L-moments (see TLMoments and parameters) from two vectors or two matrices of observation, e.g. winter and summer observations from one or more than one station. Based on these two parameter vectors, a p-quantile of the two-component GEV will be calculated for the jth station.

Usage

1
2
RegioGEVSeas(x1, x2, p, j = 1, leftrim = 0, rightrim = 0, na.rm = TRUE,
  ...)

Arguments

x1

vector or matrix of observations from season 1 (rows: observations, columns: stations).

x2

vector or matrix of observations from season 2 (rows: observations, columns: stations).

p

a probability.

j

quantile and parameter estimation for the jth station (jth column of x). Irrelevant if is x1 and x2 are vectors.

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.

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
24
25
26
27
28
29
30
library("evd")
# Seasonal observations of 80 years at one station:
x1 <- rgev(80, 2, 1, 0.2) # observations from season 1
x2 <- rgev(80, 3, 1, 0.3) # observations from season 2
RegioGEVSeas(x1=x1, x2=x2, p=0.95)

# Missing values in both seasons in the same year(s):
x1a <- c(NA, x1, NA)
x2a <- c(NA, x2, NA)
RegioGEVSeas(x1a, x2a, p=0.99, leftrim=0, rightrim=0, na.rm=TRUE)

# Missing values in both seasons in different year(s):
x1b <- x1
x1b[c(4,19)] <- NA
x2b <- x2
x2b[77] <- NA
RegioGEVSeas(x1b, x2b, p=0.99, leftrim=0, rightrim=0, na.rm=TRUE)

# Seasonal observations of 100 years at 4 stations:
x1 <- matrix(rgev(400, 2, 1, 0.3), ncol=4)
x2 <- matrix(rgev(400, 4, 1, 0.2), ncol=4)
# estimate quantile for station 1 and 2 (consider the same shape-parameters):
RegioGEVSeas(x1, x2, p=0.99, j=1, leftrim=0, rightrim=0)
RegioGEVSeas(x1, x2, p=0.99, j=2, leftrim=0, rightrim=0)

# With missing values:
x3 <- x1
x4 <- x2
x3[c(54, 89, 300)] <- NA
RegioGEVSeas(x3, x4, p=0.99, j=1, leftrim=0, rightrim=0)

flood documentation built on May 2, 2019, 4:04 p.m.

Related to RegioGEVSeas in flood...