rwme: Random Walk using Rcpp

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

A Random Walk sampler using Rcpp

Usage

1
rwme(sigma, xo, N)

Arguments

sigma

the standard deviation of the normal random increment with a zero mean

N

the designated number of random numbers (including the initial point x0)

x0

the initial iteration point

Value

the sample

Examples

1
2
3
4
5
6
7
## Not run: 
laplace<-function(x) return(1/2*exp(-abs(x)))
lapC <- rwme(2,25,2000);
plot(1:2000,lapC,type='l')
abline(h=c(-3*sqrt(2),3*sqrt(2)))

## End(Not run)

wangq326/SC19074 documentation built on Jan. 2, 2020, 8:48 p.m.