View source: R/random_diagonal_matrix.R
rand_diag_mat | R Documentation |
Creates a diagonal n x n
variance matrix with user-defined minimum and maximum
variances based on a continuous uniform distribution.
rand_diag_mat(n = 5, min.var = 0, max.var = 1)
n |
A scalar defining the dimensions of the variance matrix. |
min.var |
A scalar defining the minimum variance. |
max.var |
A scalar defining the maximum variance. |
A diagonal n x n
variance matrix.
# Simulate a random diagonal matrix with 10 columns and rows.
diag_mat <- rand_diag_mat(
n = 10,
min.var = 0,
max.var = 0.2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.