Random scaling used with balls
Approximates an isotropic decreasing density function by a density function that is isotropic with respect to the l_1 norm.
RRrectangular(phi, safety, minsteplen, maxsteps, parts, maxit, innermin, outermax, mcmc_n, normed, approx, onesided)
phi |
a shape function; it is the user's responsibility that it is non-negative. See Details. |
safety, minsteplen, maxsteps, parts, maxit, innermin, outermax, mcmc_n |
Technical arguments to run an algorithm to simulate from this
distribution. See |
normed |
logical. If |
approx |
logical.
Default is |
onesided |
logical.
Only used for univariate distributions.
If |
This model defines an isotropic density function $f$ with respect to the l_1 norm, i.e. f(x) = c φ(\|x\|_{l_1}) with some function φ. Here, c is a norming constant so that the integral of f equals one.
In case that φ is monotonically decreasing then rejection sampling is used, else MCMC.
The function φ might have a polynomial pole at the origin and asymptotical decreasing of the form x^β exp(-x^δ).
RRrectangular
returns an object of class RMmodel
.
Martin Schlather, schlather@math.uni-mannheim.de, https://www.wim.uni-mannheim.de/schlather/
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set ## RFoptions(seed=NA) to make them all random again # simulation of Gaussian variables (in a not very straightforward way): distr <- RRrectangular(RMgauss(), approx=FALSE) z <- RFrdistr(distr, n=1000000) hist(z, 200, freq=!TRUE) x <- seq(-10, 10, 0.1) lines(x, dnorm(x, sd=sqrt(0.5))) #creation of random variables whose density is proportional # to the spherical model: distr <- RRrectangular(RMspheric(), approx=FALSE) z <- RFrdistr(distr, n=1000000) hist(z, 200, freq=!TRUE) x <- seq(-10, 10, 0.01) lines(x, 4/3 * RFcov(RMspheric(), x))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.