Learn R Programming

nethet (version 1.4.2)

generate_inv_cov: generate_inv_cov

Description

Generate an inverse covariance matrix with a given sparsity and dimensionality

Usage

generate_inv_cov(p = 162, sparsity = 0.7)

Arguments

p
Dimensionality of the matrix.
sparsity
Determined the proportion of non-zero off-diagonal entries.

Value

  • A p by p positive definite inverse covariance matrix.

Details

This function generates an inverse covariance matrix, with at most (1-sparsity)*p(p-1) non-zero off-diagonal entries, where the non-zero entries are sampled from a beta distribution.

Examples

Run this code
generate_inv_cov(p=162)

Run the code above in your browser using DataLab