rwMC: Random walk Metropolis sampler using Rcpp.

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Implement a random walk Metropolis sampler for generating the standard Laplace distribution

Usage

1
rwMC(x0, sigma, N)

Arguments

x0

initial point

sigma

normal distribution variance

n

sample size

Value

x a random sample of size n

k the number of iterations

Examples

1
2
3
4
5
6
7
## Not run: 
x0<-25
sigma<-0.05
n<-2000
rwMC(x0,sigma,n)

## End(Not run)

SC19087/SC19087 documentation built on Jan. 3, 2020, 1:08 p.m.