Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAGON "ggm" result diagonal elements not equal zero #305

Closed
cchen22 opened this issue Nov 28, 2023 · 1 comment
Closed

DRAGON "ggm" result diagonal elements not equal zero #305

cchen22 opened this issue Nov 28, 2023 · 1 comment

Comments

@cchen22
Copy link
Contributor

cchen22 commented Nov 28, 2023

@katehoffshutta

get_partial_correlation_from_precision = function(Theta,selfEdges=FALSE)
{
  # by default, does not return self edges (diagonal is set to zero)
  ggm = -cov2cor(Theta)
  if(!selfEdges)
    ggm[diag(ggm)] = 0
  return(ggm)
}

ggm[diag(ggm)] = 0 needs to be changed to diag(ggm)=0

Thanks,
Chen

@marouenbg
Copy link
Collaborator

@cchen22 , I just merged kate's PR, feel free to re-open the issue if this doesn't solve the issue.

@marouenbg marouenbg mentioned this issue Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants