prior {ExtremalDep} | R Documentation |
Random generation from the prior distribution for extremal parametric models or density evaluation of the extremal parametric models.
prior(model, type = c("r", "d"), n, par, Hpar, log, dimData)
model |
The parametric model considered. Values can be |
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 |
par |
The values of the parameters.
Only used if |
Hpar |
A list of hyper-parameters. See Details. |
log |
Logical; Only used if |
dimData |
The dimension of the simplex. |
For the Pairwise Beta model, the parameters components are independent, log-normal.
The vector of parameters is of size choose(dim,2)+1
with positive components. The first elements are the
pairiwse dependence parameters b
and the last one is the global dependence parameter alpha
.
The list of hyper-parameters should be of the form
mean.alpha=, mean.beta=, sd.alpha=, sd.beta=
;
For the Husler-Reiss model, the parameters components are independent, log-normal.
The vector of parameters is of size choose(dim,2)+1
with positive components. The elements correspond
to the lambda
parameter. The list of hyper-parameters should be of the form mean.lambda=, sd.lambda=
;
For the Dirichlet model, the parameters' components are independent, log-normal.
The vector of parameters is of size dimData
with positive components. The elements correspond to the alpha
parameter. The list of hyper-parameters should be of the form mean.alpha=, sd.alpha=
;
For the Extremal-t model, the parameters' components are independent, logit-squared for rho
and log-normal for mu
. The vector of parameters is of size dimData
with positive components. The first elements correspond to the correlation parameters rho
and the last parameter is the global dependence parameter mu
. The list of hyper-parameters should be of the form mean.rho=, mean.mu=, sd.rho=, sd.mu=
;
For the Asymmetric Logistic model, the parameters' components are independent, log(+1)-normal for alpha
and logit for beta
.
The vector of parameters is of size
2^{dimData-1}(dimData+2)-(2 dimData+1)
2^dimData-1(dimData+2)-(2 dimData+1) with positive components.
The list of hyper-parameters should be of the form mean.alpha=, mean.beta=, sd.alpha=, sd.beta=
.
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"
.
Simone Padoan, simone.padoan@unibocconi.it, https://mypage.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com/;
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)