space: Fit the SPACE model.

Description Usage Arguments Value See Also Examples

Description

Estimate partial correlations according to SPACE model.

Usage

1
2
space(Y, lam1, sridge = 0, sig = NULL, weight = NULL, iter = 3,
  tol = 1e-06, cdmax = 10000000L, rho = NULL, iscale = TRUE)

Arguments

Y

Numeric matrix (N \times Q) containing N iid samples of the response vector \textbf{y}.

lam1

Non-negative numeric value, the space-lasso penalty corresponding to λ_1, which subjects the partial correlation vector, \bf ρ_{yy}, to the l_1 norm. It induces overall sparsity of \{ y_q - y_l : q \neq l \} edges. .

sridge

The l_2 penalty parameter defaults to 0. When it is positive, it imposes an elastic net penalty in tandem with lam1 on ρ.

sig

Positive numeric vector (p \times 1) representing the estimate of σ^{ii}, the diagonal of the inverse covariance matrix. It defaults to NULL and and will be estimated iter times during the model fitting with initial values set to the ones vector.

weight

The weights applied to the Q regressions in the SPACE model.

If weight==NULL, each regression has equal weight.

If weight==1, each regression is weighted according to σ^{ii} and enforces iter>=2.

If weight==2 each regression is weighted according to the out-degree of qth response variable and enforces iter>=2.

Otherwise, weight=user-specified vector of length p.

The scale of weight does not matter. In this function, weight will be rescaled to have mean=1

iter

Positive integer specifying the number of iterations for estimating σ^{ii} and ρ. Defaults to 3.

tol

Positive numeric value specifying the convergence tolerance of the coordinate descent algorithm; in other words, it is criterion that stops parameter estimation when no parameter changes value exceeding tol between iterations. tol defaults to 1e-6, but may be lowered (e.g. 1e-4) to speed up network learning.

cdmax

Positive integer specifiying the maximum number of parameter updates allowed before reporting the algorithm as having failed to converge. Default may need to be increased for inferring very large-scale networks (i.e. p,q > 1000).

rho

Numeric matrix (p \times p) representing the estimate of \hatρ, the partial correlation matrix. It defaults to NULL and and will be estimated iter times during the model fitting.

iscale

Logical indicating to standardize the whole input data. Defaults to TRUE. See base::scale(x, center = TRUE, scale = TRUE) for details of standardization.

Value

A list containing

  1. ParCor The estimated partial correlation matrix (P \times P), where off-diagonals |\hat ρ^{p,q}_{yy}| > 1e-6 encode the edges \{ y_q - y_l : q \neq l \} and the diagonals are 1's.

  2. sig.fit The estimated diagonal \hat σ^{ii}.

  3. rss The residual sums of squares from the model fit.

  4. convergence logical: true for successful convergence, otherwise failed to converge. Failure can be mitigated by increasing tol and/or cdmax.

  5. deltaMax The maximum change in parameter values between the penultimate and ultimate iteration. If spacemap does not converge, deltaMax provides some measure of how far away it was from converging when compared to tol.

See Also

spacemap, cvVote, bootEnsemble, bootVote

Examples

1
2
3
4
data(sim1)
net <- spacemap::space(Y = sim1$Y, lam1 = 70)
#adjacency matrix of y-y edges. 
adjnet <- adjacency(net)

topherconley/spacemap documentation built on May 31, 2019, 6:36 p.m.