Description Usage Arguments Value Examples
A Metropolis-Hastings sampler from a standard Cauchy distribution using R.
1 | rw.Metropolis(sigma = 2, x0 = 10, N)
|
sigma |
The standard deviation of Metropolis-Hastings sampler. |
x0 |
The initial value of Metropolis-Hastings sampler. |
N |
The number of samples. |
A random sample of size n
.
1 2 3 4 5 | ## Not run:
rnR=rw.Metropolis(2,10,2000)
plot(rnR$x,type='l')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.