From 408d78307052552d3aea167e2f4768c48f920c08 Mon Sep 17 00:00:00 2001 From: Theo-qua Date: Mon, 19 Feb 2024 16:37:37 +0100 Subject: [PATCH] minor fix on legacy --- R/MADMMplasso.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/MADMMplasso.R b/R/MADMMplasso.R index e83a690..a411365 100644 --- a/R/MADMMplasso.R +++ b/R/MADMMplasso.R @@ -50,7 +50,7 @@ #' @example inst/examples/MADMMplasso_example.R #' @export -MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, max_it = 50000, e.abs = 1E-3, e.rel = 1E-3, maxgrid, nlambda, rho = 5, my_print = FALSE, alph = 1.8, tree, parallel = TRUE, pal = 0, gg = NULL, tol = 1E-4, cl = 4,legacy=TRUE) { +MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, max_it = 50000, e.abs = 1E-3, e.rel = 1E-3, maxgrid, nlambda, rho = 5, my_print = FALSE, alph = 1.8, tree, parallel = TRUE, pal = 0, gg = NULL, tol = 1E-4, cl = 4,legacy=FALSE) { N <- nrow(X) p <- ncol(X) @@ -194,7 +194,7 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma new_y <- y - (matrix(1, N) %*% beta0 + Z %*% ((theta0))) XtY <- crossprod((my_W_hat), (new_y)) - print(legacy) + cl1 <- cl if (parallel) {