Establish whether each of the corresponding edges are significantly different in two groups, with the de-sparsified estimator of (Jankova and Van De Geer 2015) .

compare_edges(object_1, object_2, method = "fdr", alpha = 0.05, ...)

Arguments

object_1

object of class ggmncv .

object_2

An object of class ggmncv.

method

Character string. A correction method for multiple comparisons (defaults to fdr), which can be abbreviated. See p.adjust.

alpha

Numeric. Significance level (defaults to 0.05).

...

Currently ignored.

Value

  • P_diff De-sparsified partial correlation differences

  • adj Adjacency matrix based on the p-values.

  • pval_uncorrected Uncorrected p-values

  • pval_corrected Corrected p-values

  • method The approach used for multiple comparisons

  • alpha Significance level

Note

For low-dimensional settings, i.e., when the number of observations far exceeds the number of nodes, this function likely has limited utility and a non regularized approach should be used for comparing edges (see for example GGMnonreg).

Further, whether the de-sparsified estimator provides nominal error rates remains to be seen, at least across a range of conditions. For example, the simulation results in Williams (2021) demonstrated that the confidence intervals can have (severely) compromised coverage properties (whereas non-regularized methods had coverage at the nominal level).

References

Jankova J, Van De Geer S (2015). “Confidence intervals for high-dimensional inverse covariance estimation.” Electronic Journal of Statistics, 9(1), 1205--1229.

Williams DR (2021). “The Confidence Interval that Wasn't: Bootstrapped "Confidence Intervals" in L1-Regularized Partial Correlation Networks.” PsyArXiv. doi: 10.31234/osf.io/kjh2f .

Examples

# data
# note: all edges equal
Y1 <- MASS::mvrnorm(250, rep(0, 10), Sigma = diag(10))
Y2 <- MASS::mvrnorm(250, rep(0, 10), Sigma = diag(10))

# fit models
# note: atan penalty by default

# group 1
fit1 <- ggmncv(cor(Y1), n = nrow(Y1),
               progress = FALSE)

# group 2
fit2 <- ggmncv(cor(Y2), n = nrow(Y2),
               progress = FALSE)

# compare
compare_ggms <- compare_edges(fit1, fit2)

compare_ggms
#> Compare Edges 
#> fdr: 0.05
#> ---
#> 
#>    1 2 3 4 5 6 7 8 9 10
#> 1  0 0 0 0 0 0 0 0 0  0
#> 2  0 0 0 0 0 0 0 0 0  0
#> 3  0 0 0 0 0 0 0 0 0  0
#> 4  0 0 0 0 0 0 0 0 0  0
#> 5  0 0 0 0 0 0 0 0 0  0
#> 6  0 0 0 0 0 0 0 0 0  0
#> 7  0 0 0 0 0 0 0 0 0  0
#> 8  0 0 0 0 0 0 0 0 0  0
#> 9  0 0 0 0 0 0 0 0 0  0
#> 10 0 0 0 0 0 0 0 0 0  0