prior.pb: Prior parameter distribution for the Pairwise Beta model

View source: R/prior.pb.r

prior.pbR Documentation

Prior parameter distribution for the Pairwise Beta model

Description

Density and generating function of the prior distribution.

Usage

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

Arguments

type

One of the character strings "r", "d"

n

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

par

A vector with positive components: The parameter where the density is to be taken. Only used if type=="d". In the Pairwise Beta model, par is of length choose(p,2)+1. The first element is the global dependence parameter, the subsequent ones are the pairwise dependence parameters, in lexicographic order (e.g. \beta_{1,2}, \beta_{1,3}, \beta_{2,3}.

Hpar

list of Hyper-parameters : see pb.Hpar for a template.

log

logical. Should the density be returned on the log scale ? Only used if type=="d"

dimData

The dimension of the sample space. (one more than the dimension of the simplex)

Details

The parameters components are independent, log-normal.

Value

Either a matrix with n rows containing a random parameter sample generated under the prior (if type == "d"), or the (log)-density of the parameter par.

Author(s)

Anne Sabourin

Examples

## Not run: prior.pb(type="r", n=5 ,Hpar=get("pb.Hpar"), dimData=3 ) 
## Not run: prior.pb(type="d", par=rep(1,choose(4,2), Hpar=get("pb.Hpar"), dimData=4 ) 

lbelzile/BMAmevt documentation built on April 28, 2023, 2:29 p.m.