| space | R Documentation |
Estimates a sparse network of partial correlations among the q columns
of matrix-variate data using an L1-penalized (lasso) SPACE-style
shooting algorithm, with optional per-column reweighting and residual
variance (sig) re-estimation across outer iterations.
space(
data,
lam,
sig = NULL,
f_type = "equal",
iter = 2,
beta_init = NULL,
sig_init = NULL
)
data |
list of n matrices, each p × q. All matrices share the same p × q shape; n is the number of independent replicates and the q columns are the variables whose pairwise partial correlations are estimated. |
lam |
lasso penalty applied to the off-diagonal partial correlation coefficients. |
sig |
optional length-q sigma vector; NULL = iterative estimate |
f_type |
"equal" | "variance" | "degree" |
iter |
number of outer iterations |
beta_init |
optional warm-start for beta: a q x q matrix/flat vector
(row-major, i*q+j layout) forwarded to the first internal
|
sig_init |
optional length-q warm-start for the STARTING value of
SIG when SIG.update = TRUE (i.e. sig = NULL). Unlike
|
A list with components:
ParCor |
q x q matrix of estimated partial correlations (diagonal = 1). |
beta |
q x q matrix of estimated regression coefficients. |
sig |
length-q vector of estimated column residual precisions (1/variance). |
f |
length-q vector of final per-column weights. |
total_iter |
total number of shooting iterations across all outer iterations. |
E |
list of n residual matrices (p x q each). |
set.seed(1)
p <- 5; q <- 4; n <- 3
data <- replicate(n, matrix(rnorm(p * q), p, q), simplify = FALSE)
fit <- space(data, lam = 0.1, iter = 1)
fit$ParCor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.