marginal.lkl {BMAmevt} | R Documentation |
Marginal model likelihood
Description
Estimates the marginal likelihood of a model, proceeding by simple Monte-Carlo integration under the prior distribution.
Usage
marginal.lkl(
dat,
likelihood,
prior,
Nsim = 300,
displ = TRUE,
Hpar,
Nsim.min = Nsim,
precision = 0,
show.progress = floor(seq(1, Nsim, length.out = 20))
)
Arguments
dat |
The angular data set relative to which the marginal model likelihood is to be computed |
likelihood |
The likelihood function of the model.
See |
prior |
The prior distribution: of type |
Nsim |
Total number of iterations to perform. |
displ |
logical. If |
Hpar |
A list containing Hyper-parameters to be passed to
|
Nsim.min |
The minimum number of iterations to be performed. |
precision |
the desired relative precision. See
|
show.progress |
An vector of integers containing the times (iteration numbers) at which a message showing progression will be printed on the standard output. |
Details
The function is a wrapper calling MCpriorIntFun
with parameter FUN
set to likelihood
.
Value
The list returned by MCpriorIntFun
. The estimate is the list's element named emp.mean
.
Note
The estimated standard deviations of the estimates produced by this function should be handled with care:For "larger" models than the Pairwise Beta or the NL models, the likelihood may have infinite second moment under the prior distribution. In such a case, it is recommended to resort to more sophisticated integration methods, e.g. by sampling from a mixture of the prior and the posterior distributions. See the reference below for more details.
References
KASS, R. and RAFTERY, A. (1995). Bayes factors. Journal of the american statistical association , 773-795.
See Also
marginal.lkl.pb
, marginal.lkl.nl
for direct use with the implemented models.
Examples
## Not run:
lklNL= marginal.lkl(dat=Leeds,
likelihood=dnestlog,
prior=prior.nl,
Nsim=20e+3,
displ=TRUE,
Hpar=nl.Hpar,
)
## End(Not run)