SimulateSymmetricMatrix | R Documentation |
Simulates a symmetric matrix with block structure. If
continuous=FALSE
, matrix entries are sampled from a discrete uniform
distribution taking values in v_within
(for entries in the diagonal
block) or v_between
(for entries in off-diagonal blocks). If
continuous=TRUE
, entries are sampled from a continuous uniform
distribution taking values in the range given by v_within
or
v_between
.
SimulateSymmetricMatrix(
pk = 10,
v_within = c(0.5, 1),
v_between = c(0, 0.1),
v_sign = c(-1, 1),
continuous = FALSE
)
pk |
vector of the number of variables per group, defining the block structure. |
v_within |
vector defining the (range of) nonzero entries in the
diagonal blocks. If |
v_between |
vector defining the (range of) nonzero entries in the
off-diagonal blocks. If |
v_sign |
vector of possible signs for matrix entries. Possible inputs
are: |
continuous |
logical indicating whether to sample precision values from
a uniform distribution between the minimum and maximum values in
|
A symmetric matrix with uniformly distributed entries sampled from different distributions for diagonal and off-diagonal blocks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.