Skip to content

Instantly share code, notes, and snippets.

@SachaEpskamp
Created April 8, 2018 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SachaEpskamp/80c930fd0aa441123d81a9c23d6616ec to your computer and use it in GitHub Desktop.
Save SachaEpskamp/80c930fd0aa441123d81a9c23d6616ec to your computer and use it in GitHub Desktop.
library(qgraph)
library(bootnet)
net <- genGGM(10)
Sigma <- cov2cor(solve(diag(10) - net))
D <- diag(1, 10) # Change the value here to add or remove measurment error
qgraph(Sigma + D, graph = "pcor")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment