latent.fit {hkevp}R Documentation

Fitting procedure of the latent variable model

Description

Metropolis-within-Gibbs algorithm that returns posterior distribution (as Markov chains) for the marginal GEV parameters of an observed spatial process. This function is close to hkevp.fit but with less parameters since conditional independence is assumed and only the margins are estimated. In SpatialExtremes library, a similar function can be found under the name latent.

Usage

latent.fit(
  y,
  sites,
  niter,
  nburn,
  nthin,
  quiet,
  trace,
  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.

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.

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 \sigma 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 Davison et al. (2012). This function follows the indications and the choices of the authors, with the exception of several small changes:

If the 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:

\mu(s) = \beta_{0,\mu} + \beta_{1,\mu} c_1(s) + ... + \beta_{p,\mu} 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 \beta_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(loc = .5) for instance, but must respect the constraints of each element:

Value

A named list with following elements (less elements if fit.margins is FALSE):

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>

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

hkevp.fit

Examples


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

# Latent Variable Model fit:
set.seed(1)
fit <- latent.fit(ysim, sites, niter = 10000, nburn = 5000, nthin = 5)
mcmc.plot(fit, TRUE)
par(mfrow = c(2,2))
apply(fit$GEV[,1,], 1, acf)






[Package hkevp version 1.1.5 Index]