generate_inv_cov {nethet}R Documentation

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.

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.

Value

A p by p positive definite inverse covariance matrix.

Examples

generate_inv_cov(p=162)

[Package nethet version 1.25.0 Index]