metropolis: Metropolis algorithm to simulate realisations from a standard...

Description Usage Arguments Examples

View source: R/mh.R

Description

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

Usage

1
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

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

nclbayes documentation built on May 2, 2019, 5:53 p.m.