Description Usage Arguments Value Note See Also Examples
RRmcmc draws a random sample from the
modulus of any given function (provided the integral is finite).
1 |
phi |
an arbitrary integrable function |
mcmc_n |
positive integer. Every |
sigma |
positive real number.
The MCMC update is done by adding a normal variable with
standard deviation |
normed |
logical.
Only used if the value of the density is calculated.
If Default: |
maxdensity |
positive real number.
The given density is truncated at Default: 1000. |
rand.loc |
logical. Internal. Do not change the value. Default: |
gibbs |
logical. If Default: |
RRmcmc returns an object of class RMmodel.
The use of RRmcmc is completely on the risk of the user. There is no
way to check whether the integral of the modulus is finite.
1 2 3 4 5 6 7 8 | 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 distribution as symmetry is assumed
z <- RFrdistr(RRmcmc(RMexp(), sigma=1), n=10000, cores=1)
hist(z, 100, freq=FALSE)
curve(0.5 * exp(-abs(x)), add=TRUE, col="blue") ## Laplace distribution
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.