runiform_ball {PACBO} | R Documentation |
This function generates random samples from multivariate uniform distribution on a ball in R^d, equipped with L^{2} norm (i.e., Euclidean distance), centered in 0, with radius R.
runiform_ball(n, d, R)
n |
number of desired samples. |
d |
positive integer, representing the dimension of the observations. |
R |
positive real value, the radius of the ball in R^d. |
This function generates samples from the multivariate uniform distribution whose density is
π(c, R) = Γ(d/2 + 1)/ π^{d/2} * 1/(R)^{d} 1_{B_{d}(R)}(c),
where 1_{B_{d}(R)} is a centered L^{2} ball with radius R.
a matrix of n
samples of length d.
##generating 10000 samples from uniform distribution on a unit ball in \strong{R}^{2} result <- runiform_ball(10000, 2, 1) plot(result)