prior {ExtremalDep}R Documentation

Prior parameter distribution for parametric models.

Description

Random generation from the prior distribution for extremal parametric models or density evaluation of the extremal parametric models.

Usage

	prior(model, type = c("r", "d"), n, par, Hpar, log, dimData)

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 of the model considered.

n

The number of parameters to be generated. Only used if type=="r".

par

The values of the parameters. Only used if type=="d". The first elements correspond to the parameters alpha and the last parameters are the beta parameters. See Details.

Hpar

A list of hyper-parameters. See Details.

log

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

dimData

The dimension of the simplex.

Details

Value

If type=="r", a matrix with n rows containing a random parameter sample generated under the prior is returned, the (log)-density is returned if type=="d".

Author(s)

Simone Padoan, simone.padoan@unibocconi.it, https://mypage.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com/;

Examples

MCpar <- 0.35
Hpar.pb <- 	list(mean.alpha=0, mean.beta=3,sd.alpha=3, sd.beta=3)
Hpar.hr <- list(mean.lambda=0, sd.lambda=3)
Hpar.di <- list(mean.alpha=0, sd.alpha=3)
Hpar.et <- list(mean.rho=0, mean.mu=3,sd.rho=3, sd.mu=3)
Hpar.alm <- list(mean.alpha=0, mean.beta=0, sd.alpha=3, sd.beta=3)

prior(model="Pairwise", type="r", n=5, Hpar=Hpar.pb, dimData=3)
prior(model="Pairwise", type="d", par=rep(1,choose(4,2)+1), Hpar=Hpar.pb, log=TRUE, dimData=3)

prior(model="Husler", type="r", n=5, Hpar=Hpar.hr, dimData=3)
prior(model="Husler", type="d", par=rep(1,choose(4,2)), Hpar=Hpar.hr, log=TRUE, dimData=3)

prior(model="Dirichlet", type="r", n=5, Hpar=Hpar.di, dimData=3)
prior(model="Dirichlet", type="d", par=rep(1,3), Hpar=Hpar.di, log=TRUE, dimData=3)

prior(model="Extremalt", type="r", n=5, Hpar=Hpar.et, dimData=3)
prior(model="Extremalt", type="d", par=c(rep(0.1,3),4), Hpar=Hpar.et, log=TRUE, dimData=3)

prior(model="Asymmetric", type="r", n=5, Hpar=Hpar.alm, dimData=3)
prior(model="Asymmetric", type="d", par=c(rep(2,4),rep(0.7,9)), Hpar=Hpar.alm, log=TRUE, dimData=3)


[Package ExtremalDep version 0.0.3-5 Index]