Learn R Programming

hkevp (version 1.1.6)

extrapol.gev: Spatial extrapolation of GEV parameters with the HKEVP

Description

Predictive distributions of the GEV parameters at a set of ungauged sites (targets), given the output from the MCMC procedures hkevp.fit or latent.fit. See details.

Usage

extrapol.gev(fit, targets, targets.covariates)

Value

A named list of three elements: loc, scale, shape. Each one is a matrix with columns corresponding to targets positions.

Arguments

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

Since the GEV parameters are modelled with latent Gaussian processes, spatial extrapolation of the marginal distributions at target positions \((s^*_1, ..., s^*_k)\) is performed with simple kriging. Estimation is done at each MCMC step to produce a sample of the predictive distribution.

See Also

extrapol.return.level

Examples

Run this code
# \donttest{
# Simulation of HKEVP:
sites <- as.matrix(expand.grid(1:3,1:3))
loc <- sites[,1]*10
scale <- 3
shape <- 0
alpha <- .4
tau <- 1
ysim <- hkevp.rand(10, sites, sites, loc, scale, shape, alpha, tau)

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

## Extrapolation:
targets <- matrix(1.5, 1, 2)
gev.targets <- extrapol.gev(fit, targets)

## True vs predicted:
predicted <- sapply(gev.targets, median)
sd.predict <- sapply(gev.targets, sd)
true <- c(targets[,1]*10, scale, shape)
# cbind(true, predicted, sd.predict)
# }

Run the code above in your browser using DataLab