Skip to content

Instantly share code, notes, and snippets.

View donaldRwilliams's full-sized avatar

Donald R. Williams donaldRwilliams

View GitHub Profile
@donaldRwilliams
donaldRwilliams / gist:abb377460603e02ce335e318d26ad6f9
Last active November 8, 2021 15:26
estimate covariance matrix with regression
# estimate covariance matrix with regression
library(GGMnonreg)
p = 20
pcors = GGMnonreg::gen_net(p = p)
y = MASS::mvrnorm(n = 500,
mu = rep(0, p),
Sigma = pcors$cors)