rw.Metropolis: A Metropolis-Hastings sampler from a standard Cauchy...

Description Usage Arguments Value Examples

Description

A Metropolis-Hastings sampler from a standard Cauchy distribution using R.

Usage

1
rw.Metropolis(sigma = 2, x0 = 10, N)

Arguments

sigma

The standard deviation of Metropolis-Hastings sampler.

x0

The initial value of Metropolis-Hastings sampler.

N

The number of samples.

Value

A random sample of size n.

Examples

1
2
3
4
5
## Not run: 
rnR=rw.Metropolis(2,10,2000)
plot(rnR$x,type='l')

## End(Not run)

lxz124/StatComp18090 documentation built on May 12, 2019, 5:17 p.m.