mrfbayes: Metropolis-Hasting algorithm for Markov Random Fields on...

View source: R/mrfbayes.R

mrfbayesR Documentation

Metropolis-Hasting algorithm for Markov Random Fields on lattices

Description

Metropolis-Hasting algorithm for Markov Random Fields on lattices

Usage

mrfbayes(
  z,
  llapprox,
  nsamples = 1000,
  init_theta = "zero",
  sdprior = 10,
  sdkernel = 0.05,
  verbose = interactive()
)

Arguments

z

The observed random field.

llapprox

The likelihood approximation to be used.

nsamples

Number of MCMC samples.

init_theta

Initial values of the MCMC algorithm. Set to "zero" to automatically create a vector equal to zero with appropriate length or "pl" to use the Maximum Pseudolikelihood estimator of z as the initial value.

sdprior

Sample Deviation of the Normal distributions used as prior.

sdkernel

Sample Deviation of the Normal distributions of the transition kernel.

verbose

logical value indicating wheter the algorithm progress should be printed.

Value

An object of class mrfbayes_out


Freguglia/mrf2dbayes documentation built on Jan. 19, 2024, 11:21 p.m.