random.pm(n, values = n*diff(seq(0,1,length=n+1)**0.75))
values
is chosen so that the eigenvalues of the
resulting matrix are roughly
similar to the eigenvalues typically observed on Genetic Relationship Matrices.
lmm.simu
, eigen
# generate a random positive matrix
set.seed(1)
R <- random.pm(503)
str(R)
Run the code above in your browser using DataLab