Generate a random symetric positive definite matrix. The generator just
draw matrix of the form O * diag(positive values) * t(O), where O is an
orthogonal matrix from ROOPSD::rorthogonal_group. Note that the parameter
gen = stats::rexp draw positive eigen values, but the code do not control
if eigen values are positive. So you can accept negative eigen values using
another generators.
Usage
rspd_matrix(d, n = 1, sort_eigenvalues = TRUE, gen = stats::rexp)
Value
[array or matrix], dim = d * d * n or d * d if n == 1