gevcdn.evaluate: Evaluate parameters from trained GEV CDN model

Description Usage Arguments Value References See Also Examples

Description

Evaluate a trained GEV CDN model, resulting in a matrix with columns corresponding to the location, scale, and shape parameters of the GEV distribution.

Usage

1

Arguments

x

covariate matrix with number of rows equal to the number of samples and number of columns equal to the number of variables.

weights

list containing GEV CDN input-hidden and hidden-output layer weight matrices from gevcdn.fit or gevcdn.bag.

Value

a matrix with number of rows equal to that of x and columns corresponding to the GEV location, scale, and shape parameters.

References

Cannon, A.J., 2010. A flexible nonlinear modelling framework for nonstationary generalized extreme value analysis in hydroclimatology. Hydrological Processes, 24: 673-685. DOI: 10.1002/hyp.7506

See Also

gevcdn.fit, gevcdn.bag, dgev

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Generate synthetic data

x <- as.matrix(1:50)
y <- as.matrix(rgev(length(x), location = 0, scale = 1, shape = 0.2))

## Fit stationary model

weights <- gevcdn.fit(x = x, y = y, Th = gevcdn.identity,
                      fixed = c("location", "scale", "shape"))

## Evaluate GEV parameters

parms <- gevcdn.evaluate(x, weights)
cat("GEV parameters", parms[1,], "\n")

Example output

Loading required package: VGAM
Loading required package: stats4
Loading required package: splines
1 -12.22777 2 -12.22777 3 -12.22777 4 -12.22777 5 -12.22777 
GEV parameters 0.1406678 1.209693 0.05017991 

GEVcdn documentation built on April 24, 2020, 9:05 a.m.