hkevp.fit: Fitting procedure of the HKEVP with MCMC algorithm

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/hkevp.fit.R

Description

Metropolis-within-Gibbs algorithm that returns samples from posterior distribution of all the parameters of the HKEVP.

Most of the input parameters have default values, so that the procedure can be easily handled. However, convergence of the Markov chains should be assessed by using mcmc.plot for instance. The experimented user can set initial states, prior hyperparameters along with the magnitude of the MCMC jumps.

Usage

1
2
3
hkevp.fit(y, sites, knots, niter, nburn, nthin, quiet, trace, fit.margins,
  gev.vary, spatial.covariates, log.scale, correlation, mcmc.init, mcmc.prior,
  mcmc.jumps)

Arguments

y

A matrix of observed block maxima. Each column corresponds to a site position.

sites

The coordinates of the sites where the data are observed. Each row corresponds to a site position.

knots

The coordinates of the knots in the HKEVP. By default, the positions of the knots coincide with the positions of the sites.

niter

The number of MCMC iterations.

nburn

The number of first MCMC iterations that are discarded. Zero by default.

nthin

The size of the MCMC thinning. One by default (i.e. no thinning).

quiet

A logical indicating if the progression of the routine should be displayed. TRUE by default.

trace

If quiet is FALSE, the log-likelihood of the model is displayed each block of trace MCMC steps to observe fitting progression.

fit.margins

A logical that indicates if the GEV parameters should be fitted along with the dependence structure. TRUE by default.

gev.vary

A logical vector of size three indicating if the GEV parameters (respectively the location, the scale and the shape) are spatially-varying. If not (by default for the shape), the parameter is the same at each position.

spatial.covariates

A numerical matrix of spatial covariates. Each row corresponds to a site position. See details.

log.scale

A logical value indicating if the GEV scale parameter σ is modelled by its log. FALSE by default. See details.

correlation

A character string indicating the form of the correlation function associated to the latent Gaussian processes that describes the marginal parameters. Must be one of "expo", "gauss", "mat32" (By default) and "mat52", respectively corresponding to the exponential, Gaussian, Matern-3/2 and Matern-5/2 correlation functions.

mcmc.init

A named list indicating the initial states of the chains. See details.

mcmc.prior

A named list indicating the hyperparameters of the prior distributions. See details.

mcmc.jumps

A named list indicating the amplitude of the jumps to propose the MCMC candidates. See details.

Details

Details of the MCMC procedure are presented in Reich and Shaby (2012). This function follows the indications and the choices of the authors, with the exception of several small changes:

The procedure can be used normally with fit.margins = TRUE (default) or by assuming that the observed process had GEV(1,1,1) margins already and thus ignoring the marginal estimation.

If the margins are estimated and the parameters are assumed spatially-varying, the user can provide spatial covariates to fit the mean of the latent Gaussian processes. Recall for instance for the GEV location parameter that:

μ(s) = β_{0,μ} + β_{1,μ} c_1(s) + ... + β_{p,μ} c_p(s) ~.

The given matrix spatial.covariates that represents the c_i(s) elements should have the first column filled with ones to account for the intercept β_0.

The arguments mcmc.init, mcmc.prior and mcmc.jumps are named list that have default values. The user can make point changes in these arguments, by setting mcmc.init = list(alpha = .5) for instance, but must respect the constraints of each element:

Value

A named list with following elements:

If fit.margins is false, only the dependence-related elements are returned.

Author(s)

Quentin Sebille

References

Reich, B. J., & Shaby, B. A. (2012). A hierarchical max-stable spatial model for extreme precipitation. The annals of applied statistics, 6(4), 1430. <DOI:10.1214/12-AOAS591>

Stephenson, A. G. (2009) High-dimensional parametric modelling of multivariate extreme events. Aust. N. Z. J Stat, 51, 77-88. <DOI:10.1111/j.1467-842X.2008.00528.x>

Davison, A. C., Padoan, S. A., & Ribatet, M. (2012). Statistical modeling of spatial extremes. Statistical Science, 27(2), 161-186. <DOI:10.1214/11-STS376>

See Also

latent.fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Simulation of HKEVP:
set.seed(1)
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 <- latent.fit(ysim, sites, niter = 1000)

hkevp documentation built on May 30, 2017, 5:21 a.m.

Search within the hkevp package
Search all R packages, documentation and source code