gen_net: Generate True Partial Correlation Matrix

Description Usage Arguments Value Note Examples

View source: R/gen_pcors.R

Description

Generate True Partial Correlation Matrix

Usage

1
gen_net(p = 20, edge_prob = 0.3, lb = 0.05, ub = 0.3)

Arguments

p

number of variables (nodes)

edge_prob

connectivity

lb

lower bound for the partial correlations

ub

upper bound for the partial correlations

Value

A list with the true structure, adjacency matrix, and correlation matrix.

Note

The function checks for a valid matrix (positive definite), but sometimes this will still fail. For example, for larger p, to have large partial correlations this requires a sparse GGM (accomplished by setting edge_prob to a small value).

Examples

1
true_net <- gen_net(p = 10)

donaldRwilliams/GGMnonreg documentation built on May 13, 2021, 11:57 a.m.