rwMC: A random walk Metropolis sampler using Rcpp

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

A random walk Metropolis sampler for generating the standard Laplace distribution using Rcpp

Usage

1
rwMC(sigma, x0, N)

Arguments

sigma

the stand deviation of proposal distribution to the random walk Metropolis chains

x0

the initial point

N

the number of produced values in chain

Value

a random sample of the standard Laplace distribution

Examples

1
2
3
4
5
## Not run: 
out <- rwMC(2.0,20.0,2000)
plot(out[,1], type="l", main='rwMC(sigma=2)', ylab="x",xlab = "")

## End(Not run)

SC19057/package documentation built on Jan. 3, 2020, 12:10 a.m.