RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
## here a model with random scale parameter
## not exponential, but the Laplace dstribution as symmetry is assumed
z <- RFrdistr(RRmcmc(RMexp(), sigma=1), n=10000)
hist(z, 100, freq=FALSE)
curve(0.5 * exp(-abs(x)), add=TRUE, col="blue") ## Laplace distribution
Run the code above in your browser using DataLab