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.
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 of length four, with component comprised
between \(0\) and \(1\) (both end points excluded for the first
element and \(1\) included for the others):
The parameter where
the density is to be taken.
Only used if type=="d".
In the NL model,
par is of length \(4\).
The first element is the global dependence
parameter, the others are partial dependence parameter between pairs (12), (13), (23) respectively.
In the NL model,
par is of length \(4\).
The first element has the same interpretation as in the NL model, the subsequent ones are dependence parameters between
Hpar
list of Hyper-parameters : see nl.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, equal to \(3\).
Only for compatibility with e.g.posteriorMCMC.
Author
Anne Sabourin
Details
The four parameters are independent, the logit-transformed parameters follow a normal distribution.
if (FALSE) prior.nl(type="r", n=5 ,Hpar=get("nl.Hpar"))
if (FALSE) prior.trinl(type="r", n=5 ,Hpar=get("nl.Hpar"))
if (FALSE) prior.pb(type="d", par=rep(0.5,2), Hpar=get("nl.Hpar"))