Skip to content

Commit

Permalink
Fixed regression on if statement (#17)
Browse files Browse the repository at this point in the history
Regression introduced by me on 072b64a.
  • Loading branch information
wleoncio committed Jan 26, 2024
1 parent 930790e commit bb7b6e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/MADMMplasso.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma
)
}
parallel::stopCluster(cl)
} else if (parallel && pal == 0) {
} else if (!parallel && pal == 0) {
my_values <- lapply(
seq_len(nlambda),
function(g) {
Expand Down Expand Up @@ -253,7 +253,7 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma
theta0 <- my_values[hh, ]$theta0 ### iteration
beta_hat <- my_values[hh, ]$beta_hat
y_hat <- my_values[hh, ]$y_hat
} else if (parallel && pal == 0) {
} else if (!parallel && pal == 0) {
beta <- my_values[[hh]]$beta
theta <- my_values[[hh]]$theta
my_obj[[hh]] <- list(my_values[[hh]]$obj)
Expand Down

0 comments on commit bb7b6e4

Please sign in to comment.