metropolis {nclbayes}R Documentation

Metropolis algorithm to simulate realisations from a standard normal distribution

Description

Metropolis algorithm to simulate realisations from a standard normal distribution. using a U(-a,a) random walk proposal

Usage

metropolis(N, initial, a, show = TRUE)

Arguments

N

length of MCMC chain.

initial

starting value for the algorithm.

a

size of uniform innovations.

show

a logical. If TRUE then acceptance rate for the proposals will be given.

Examples

mcmcAnalysis(metropolis(100,0,1),rows=1)

[Package nclbayes version 0.3.10 Index]