Random square definite positive matrix
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) %*% t(U) with U a random orthogonal matrix.
A named list with members:
K |
A |
eigen |
The eigen decomposition of |
# generate a random positive matrix set.seed(1) R <- random.pm(500) str(R)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.