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

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

Examples

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

mas3321 documentation built on May 2, 2019, 4:42 p.m.

Related to metropolis in mas3321...