extrapol.return.level {hkevp}R Documentation

Spatial extrapolation of a return level.

Description

Predictive distribution of a T-years return level at ungauged positions (targets), given the output from the MCMC procedures hkevp.fit or latent.fit.

Usage

extrapol.return.level(period, fit, targets, targets.covariates)

Arguments

period

An integer indicating the wished return period T.

fit

Output from the hkevp.fit procedure.

targets

A matrix of real values giving the spatial coordinates of the ungauged positions. Each row corresponds to an ungauged position.

targets.covariates

A matrix of real values giving the spatial covariates of the ungauged positions. Must match with the covariates used in hkevp.fit or latent.fit.

Details

Spatial extrapolation of the return level at target positions (s^*_1, ..., s^*_k) is a two-step procedure:

Value

A matrix of predictive sample. Each column corresponds to a target position and each row to a predictive draw.

Author(s)

Quentin Sebille

See Also

extrapol.gev

Examples


# Simulation of HKEVP:
sites <- as.matrix(expand.grid(1:3,1:3))
knots <- sites
loc <- sites[,1]*10
scale <- 1
shape <- .2
alpha <- .4
tau <- 1
ysim <- hkevp.rand(10, sites, knots, loc, scale, shape, alpha, tau)

# HKEVP fit:
fit <- hkevp.fit(ysim, sites, niter = 1000)

## Extrapolation of the 100-years return level (may need more iterations and burn-in/nthin):
targets <- as.matrix(expand.grid(1.5:2.5,1.5:2.5))
pred.sample <- extrapol.return.level(100, fit, targets)
pred.mean <- apply(pred.sample, 2, mean)
pred.sd <- apply(pred.sample, 2, sd)
true <- return.level(100, targets[,1]*10, scale, shape)
# cbind(true, pred.mean, pred.sd)




[Package hkevp version 1.1.5 Index]