contLikMCMC: contLikMCMC

View source: R/contLikMCMC.R

contLikMCMCR Documentation

contLikMCMC

Description

calcMCMC provides samples from the posterior distribution of the model parameters

Usage

contLikMCMC(
  mlefit,
  niter = 10000,
  delta = 2,
  verbose = TRUE,
  seed = NULL,
  usePhi = FALSE,
  mcmcObj = NULL
)

Arguments

mlefit

Fitted object using calcMLE

niter

Number of samples in the MCMC-sampling.

delta

A numerical parameter to scale with the covariance function Sigma. Default is 2. Should be higher to obtain lower acception rate.

verbose

Whether printing simulation progress. Default is TRUE

seed

The user can set seed if wanted

usePhi

Whether the transformed domain of the parameters (phi) should be used instead. This affects the priors!

mcmcObj

An object from contLikMCMC output

Details

The procedure also uses the samples to approximate the marginal likelihood used for Bayes Factor

The Metropolis Hastings routine uses following proposal: Multivariate Normal distribution with mean 0 and covariance as delta multiplied with the inverse negative hessian with MLE inserted. Marginalized likelihood (Bayesian) is estimated using Metropolis Hastings with the "GD-method, Gelfand and Dey (1994).

Value

ret A list (logmargL,posttheta,postlogL,logpX,accrat) where logmargL is Marginalized likelihood, posttheta is the posterior samples, postlogL is log-likelihood values

Author(s)

Oyvind Bleka


oyvble/euroformix documentation built on April 13, 2025, 3:18 a.m.