Skip to content

Commit

Permalink
Merge pull request #9 from katehoffshutta/ggm-diag-fix
Browse files Browse the repository at this point in the history
fixed bug w/self-edges in GGM
  • Loading branch information
katehoffshutta authored Nov 28, 2023
2 parents bdbe676 + c4d4dbf commit fccfaf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/DRAGON.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ get_partial_correlation_from_precision = function(Theta,selfEdges=F)
# by default, does not return self edges (diagonal is set to zero)
ggm = -cov2cor(Theta)
if(!selfEdges)
ggm[diag(ggm)] = 0
diag(ggm) = 0
return(ggm)
}

Expand Down

0 comments on commit fccfaf8

Please sign in to comment.