RRmcmc
draws a random sample from the
modulus of any given function (provided the integral is finite)
RRmcmc(phi, mcmc_n, sigma, normed, maxdensity, rand.loc, gibbs)
mcmc_n
th element of the MCMC chain
is returned.
sigma
.
FALSE
the unnormed value given by phi
is returned. Default: FALSE
maxdensity
.Default: 1000
FALSE
TRUE
only one component is updated at a
time.
Default: FALSE
RRmcmc
returns an object of class RMmodel
.
RMmodel
,
RR,
RRdistr
RMuser
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