random.pm | R Documentation |
Generate a random definite positive matrix with specified dimension
random.pm(n, values)
n |
Dimension of matrix |
values |
(Optional) A numeric vector of dimension n : the eigenvalues of the matrix |
If values
isn't given, it is chosen (deterministically)
so that the eigenvalues of the resulting matrix are
similar to eigenvalues observed on Genetic Relationship Matrices.
The random matrix is generated as U diag( values ) U'
with U
a random orthogonal matrix.
A named list with members:
K |
A |
eigen |
The eigen decomposition of |
lmm.simu
, eigen
# generate a random positive matrix
set.seed(1)
R <- random.pm(500)
str(R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.