hfgolino/EGAnet

Missinc commCor after running net.scores

Closed this issue · 1 comments

Dear Professors,

I am working on an exploratory graph analysis using the EGAnet package. I am stuck with the function net.scores().
In particular, when I run this function on my data (the input is an EGA object with seven communities and no global score), the output does not contain the Partial correlations between the specified or identified communities (i.e., commCor). I am working with the last version of the package.

Could you help me with this problem?

Best Regards,

Umberto

Hi Umberto,

If you'd like to obtain the partial correlations between network dimensions using the scores, then you can use:

# Obtain network scores output
scores_object <- net.scores(data = your_data, A = your_EGA_object)

# Obtain network scores only
your_scores <- scores_object$scores$std.scores

# Compute zero-order correlations
R <- qgraph::cor_auto(your_scores)

# Obtain inverse covariance matrix
K <- solve(R)

# Obtain partial correlations
P <- -cov2cor(K)
diag(P) <- 0 # sets diagonal to zero