Learn R Programming

ExtremalDep (version 0.0.3-3)

proposal: Proposal distribution for parametric models

Description

Density of the proposal distribution q(cur.par, prop.par) and random generator of the MCMC algorithm for parametric models.

Usage

proposal(model, type = c("r", "d"), cur.par, prop.par, MCpar, log = TRUE)

Arguments

model

The parametric model considered. Values can be model="Pairwise", model="Husler", model="Dirichlet", model="Extremalt" and model="Asymmetric" respectively for the Pairwise Beta, Hulser-Reiss, Tilted Dirichlet, Extremal-t and Asymmetric Logistic.

type

One of the character strings "r" or "d" representing random generation and density for the Asymmetric Logistic model.

cur.par

Vector representing the current state of the chain. See Details.

prop.par

Vector representing the candidate parameters. See Details.

MCpar

A list made of a single element: MC MC parameter. Re-centering parameters for the proposal distribution.

log

Logical; Only used if type=="d" in order to obtain the log-density. TRUE is the default.

Value

Either the (log)-density of the proposal prop.par, given cur.par (if type=="d") or a proposal parameter (a vector), if type=="r".

Details

  • For the Pairwise Beta model, cur.par and prop.par are of size choose(dim,2)+1. The components prop.par[i] of the proposal distribution are generated independently from the log-normal distribution. prop.par = rlnorm(length(cur.par), meanlog=log(cur.par), sdlog = rep(MCpar$sdlog, length(cur.par)));

  • For the Husler-Reiss model, cur.par and prop.par are of size choose(dim,2). The components prop.par[i] of the proposal distribution are generated independently from the log-normal distribution. prop.par = rlnorm(length(cur.par), meanlog=log(cur.par), sdlog = rep(MCpar$sdlog, length(cur.par)));

  • For the Tilted Dirichlet model, cur.par and prop.par are of size dim. The components prop.par[i] of the proposal distribution are generated independently from the log-normal distribution. prop.par = rlnorm(length(cur.par), meanlog=log(cur.par), sdlog = rep(MCpar$sdlog, length(cur.par)));

  • For the Extremal-t model, cur.par and prop.par are of size choose(dim,2)+1. The components prop.par[i] of the proposal distribution are generated independently from the square root of an inverse logit transformation of the normal distribution for the correlation parameters rho and from the log transformation of the normal distribution for the global dependence parameter (the degreee of freedom mu);

  • For the Asymmetric Logistic model, cur.par and prop.par are of size \(2^{d-1}(d+2)-(2d-1)\). The components prop.par[i] of the proposal distribution are generated independently from the log transformation of the normal distribution (minus 1) for the parameters alpha and from the inverse logit transformation of the parameters beta;

Examples

Run this code
# NOT RUN {
proposal("Pairwise", "r", rep(1,4), MCpar=0.35)
proposal("Pairwise", "d", rep(1,4), rep(1.2,4), MCpar=0.35)

proposal("Husler", "r", rep(1,4), MCpar=0.35)
proposal("Husler", "d", rep(1,4), c(1.2,4), MCpar=0.35)

proposal("Dirichlet", "r", rep(1,3), MCpar=0.35)
proposal("Dirichlet", "d", rep(1,3), c(1.2,3), MCpar=0.35)

proposal("Extremalt", "r", rep(0.5,3), MCpar=0.35)
proposal("Extremalt", "d", c(rep(0.9,3),3), c(rep(0.8,3),2), MCpar=0.35)

proposal("Asymmetric", "r", c(rep(1.1,4),rep(0.1,9)), MCpar=0.35)
proposal("Asymmetric", "d", c(rep(1.1,4),rep(0.1,9)), c(rep(1.2,4),rep(0.1,9)), 0.35)

# }

Run the code above in your browser using DataLab