mcmc.mgp: Run a Markov chain Monte Carlo algorithm for multivariate...

View source: R/pseudomarg.R

mcmc.mgpR Documentation

Run a Markov chain Monte Carlo algorithm for multivariate generalized Pareto models

Description

The algorithm estimates dependence parameters and includes a latent log-Gaussian model for the scale

Usage

mcmc.mgp(dat, mthresh, thresh, lambdau = 1, model = c("br", "xstud",
  "lgm"), coord, start, numiter = 40000L, burnin = 5000L, thin = 1L,
  verbose = 100L, filename, censor = TRUE, keepburnin = TRUE,
  geoaniso = TRUE, blockupsize = ncol(dat), transform = FALSE,
  likt = c("mgp", "pois", "binom"), saveinterm = 500L, ...)

Arguments

dat

n by D matrix of observations

mthresh

vector of marginal thresholds under which data are censored

thresh

functional max threshold determining the risk region

lambdau

probability of exceedance of the threshold for censored observations

model

dependence model, either of "br", "xstud" or "lgm", in which case the model uses the independence likelihood with generalized Pareto margins

coord

matrix of coordinates, with longitude and latitude in the first two columns and additional covariates for the latent Gaussian model

start

named list with starting values for the parameters, with arguments:

  • scale: a D vector of scale parameters, strictly positive.

  • shape: a scale containing the shape and satisfying support constraints for all sites.

  • marg.pcov: initial proposal covariance for the marginal parameters (scale and shape).

  • dep: initial values for the dependence function.

  • dep: dependence function, with distance matrix as first argument and dep as second argument.

  • aniso: initial values for the anisotropy parameters, scale and angle.

  • df: degrees of freedom (if model == "xstud").

  • dep.lb: lower bounds for the dependence parameters

  • dep.ub: upper bounds for the dependence parameters

If any of scale, shape or marg.pcov are missing, the function will attempt to find starting values.

numiter

number of iterations to be returned

burnin

number of initial parameters for adaptation and discarded values.

thin

thining parameter; only every thin iteration is saved

verbose

report current values via print every verbose iterations.

filename

name of file for save.

censor

logical; should censored likelihood be used? Default to TRUE

keepburnin

logical; should initial runs during burnin be kept for diagnostic. Default to TRUE.

geoaniso

logical; should geometric anisotropy be included? Default to TRUE.

blockupsize

size of block for updates of the scale parameter; ncol(dat) yields individual updates

transform

logical; should parameters be sampled on an unconstrained space if they are bounded. Default is FALSE, in which case the Metropolis-Hastings proposals are performed by sampling from multivariate truncated Gaussian

likt

string indicating the type of likelihood, with an additional contribution for the non-exceeding components: one of "mgp", "binom" and "pois".

saveinterm

integer indicating when to save results. Default to 500L.

...

Arguments passed on to clikmgp

mthresh

vector of individuals thresholds under which observations are censored

dat

matrix of observations

thresh

functional threshold for the maximum

loc

vector of location parameter for the marginal generalized Pareto distribution

scale

vector of scale parameter for the marginal generalized Pareto distribution

shape

vector of shape parameter for the marginal generalized Pareto distribution

par

list of parameters: alpha for the logistic model, Lambda for the Brown–Resnick model or else Sigma and df for the extremal Student.

model

string indicating the model family, one of "log", "br" or "xstud"

likt

string indicating the type of likelihood, with an additional contribution for the non-exceeding components: one of "mgp", "binom" and "pois".

lambdau

vector of marginal rate of marginal threshold exceedance.

Value

a list with res containing the results of the chain


lbelzile/mgp documentation built on Aug. 5, 2023, 2:34 a.m.