Learn R Programming

PEIP (version 1.7)

mcmc: Maximum likelihood Models

Description

Maximum likelihood Models

Usage

mcmc(alogprior, aloglikelihood, agenerate, alogproposal, m0, niter)

Arguments

alogprior
Name of a function that computes the log of the prior distribution.
aloglikelihood
Name of a function the computes the log of the likelihood.
agenerate
Name of a function that generates a random model from the current model using the
alogproposal
Name of a function that computes the log of the proposal distribution r(x,y).
m0
Initial model
niter
Number of iterations to perform

Value

  • moutMCMC samples
  • mMAPBest model found in the MCMC simulation.
  • accrateAcceptance rate