fun_lines {mglasso} | R Documentation |
fun_lines
applies function fun
to regression vectors while reordering the coefficients,
such that the j
-th coefficient in beta[j, ]
is permuted with the i
-th coefficient.
fun_lines(i, j, beta, fun = `-`, ni = 1, nj = 1)
i |
integer scalar. Index of the first vector. |
j |
integer scalar. Index of the second vector. |
beta |
p by p numeric matrix. In rows, regression vectors coefficients after node-wise regression. |
fun |
function. Applied on lines. |
ni |
integer scalar. Weight for vector |
nj |
integer scalar. Weight for vector |
numeric vector
beta <- matrix(round(rnorm(9),2), ncol = 3)
diag(beta) <- 0
beta
fun_lines(1, 2, beta)
fun_lines(2, 1, beta)