Learn R Programming

hkevp (version 1.1.6)

extrapol.return.level: 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)

Value

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

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.

Author

Quentin Sebille

Details

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

  • Estimation of the predictive distribution for GEV parameters at \((s^*_1, ..., s^*_k)\), by using {extrapol.gev}.

  • Computation of the associated return level for each state of the predictive distribution.

See Also

extrapol.gev

Examples

Run this code
# \donttest{
# 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)
# }


Run the code above in your browser using DataLab