randomBeta {evolvability} | R Documentation |
Generating selection gradients/vectors in random directions.
Description
randomBeta
generates unit length vectors (selection gradients)
uniformly distributed in a k-dimensional hypersphere.
Usage
randomBeta(n = 1, k = 2)
Arguments
n |
Number of selection gradients/vectors. |
k |
Number of dimensions. |
Details
randomBeta
exploits the spherical symmetry of a multidimensional
Gaussian density function. Each element of each vector is randomly sampled
from a univariate Gaussian distribution with zero mean and unit variance. The
vector is then divided by its norm to standardize it to unit length.
Value
randomBeta
returns a matrix where the vectors are stacked column
wise.
Author(s)
Geir H. Bolstad
Examples
# Two vectors of dimension 3:
randomBeta(n = 2, k = 3)
[Package evolvability version 2.0.0 Index]