niche.runif {nicheROVER} | R Documentation |
Uniform sampling from an elliptical niche region.
Description
Uniform sampling from an elliptical niche region.
Usage
niche.runif(n, mu, Sigma, alpha = 0.95)
Arguments
n |
Number of random draws. |
mu |
Mean vector. |
Sigma |
Variance matrix. |
alpha |
Probabilistic niche size |
Value
IID draws from a uniform distribution on the elliptical niche region.
See Also
ellipse()
and niche.size()
for the definition of the elliptical niche region.
Examples
# 2d example
d <- 2 # number of dimensions
V <- crossprod(matrix(rnorm(4),d,d))
mu <- rnorm(d)
plot(ellipse(mu, V), type = "l")
points(niche.runif(1e4, mu, V), col = "brown", pch = ".")
[Package nicheROVER version 1.1.2 Index]