jewel {jewel}R Documentation

Estimate Gaussian graphical models from multiple datasets

Description

This function estimates Gaussian graphical models (i.e. networks of conditional dependencies, direct connections between variables) given multiple datasets. We assume that datasets contain measurements of the same variables collected under different conditions (different equipment, locations, even sub-types of disease).

Usage

jewel(
  X,
  lambda1,
  lambda2 = NULL,
  Theta = NULL,
  W = NULL,
  tol = 0.01,
  maxIter = 10000,
  stability = FALSE,
  stability_nsubsets = 25,
  stability_frac = 0.8,
  verbose = TRUE
)

Arguments

X

a list of K numeric data matrices of n_k samples and p variables (n_k can be different for each matrix).

lambda1

a number, first regularization parameter (of the common penalty).

lambda2

an optional number, second regularization parameter (of the class-specific penalty). If NULL, set to lambda_2 = lambda_1 * 1.4

Theta

an optional list of K regression coefficient matrices of the size p by p. User-provided initialization can be used for warm-start procedures. If NULL, initialized as all zeros.

W

an optional list of K weights matrices of the size p by p. User-provided initialization can be used when some vertices are believed to be hubs. If NULL, initialized as all ones.

tol

an optional number, convergence threshold controlling the relative error between iterations. The default value is 0.01.

maxIter

an optional number, maximum allowed number of iterations. The default value is 10 000.

stability

if stability = TRUE, stability selection procedure to reduce the number of false positives will be applied. n_k / 2 samples are randomly chosen in each dataset stability_nsubsets times and then __jewel__ method is applied to each subset. In the final estimate, we include only the edges that appear in at least stability_frac proportion of the subsets. By default this procedure is disabled since it increases the running time.

stability_nsubsets

an optional number, how many times to subsample datasets and apply __jewel__ for stability selection procedure. The default value is 25.

stability_frac

an optional number, in what proportion of the stability results on subsampled data an edge has to be present to be included into the final estimate. The default value is 0.8.

verbose

if verbose = FALSE, tracing information printing is disabled. The default value is TRUE.

Value

The following list is returned

Examples

{
K <- 3
p <- 50
n <- 20
data <- generateData_rewire(K = K, p = p, n = n, ncores = 1, verbose = FALSE)
G_list_true <- data$Graphs
X <- data$Data
true_degrees <- rowSums(G_list_true[[1]])
cut <- sort(true_degrees, decreasing = TRUE)[ceiling(p * 0.03)]
apriori_hubs <- ifelse(true_degrees >= cut, 10, 1)
W <- constructWeights(apriori_hubs, K = K)
res <- jewel(X, lambda1 = 0.25, W = W, verbose = FALSE)
}

[Package jewel version 2.0.1 Index]