make_random_precision_mat {PCGII} | R Documentation |
Generate unstructured/random network skeleton and simulates corresponding precision matrix
Description
A utility function generates unstructured/random network skeleton and simulates corresponding precision matrix. The non-zero elements of the precision matrix are generated randomly from a uniform distribution with parameters (-upper, -lower) UNION (lower, upper).
Usage
make_random_precision_mat(
eta = 0.01,
p = 20,
lower = 0.2,
upper = 0.5,
diag = 0.1
)
Arguments
eta |
A number between 0 and 1, the probability for drawing an edge between two arbitrary vertices, i.e. the sparsity of the network. |
p |
A positive integer, the number of vertices. |
lower |
A positive number, lower limits of the uniform distribution. |
upper |
A positive number, upper limits of the uniform distribution. |
diag |
A small positive number to be added to diagonal elements, which guarantees the precision matrix is positive definite. |
Value
A precision matrix of size p by p.
Examples
Omega = make_random_precision_mat(eta=.2, p=10)
[Package PCGII version 1.1.2 Index]