diff --git a/src/hh_nlambda_loop_cpp.cpp b/src/hh_nlambda_loop_cpp.cpp index 9c619b9..af42bb4 100644 --- a/src/hh_nlambda_loop_cpp.cpp +++ b/src/hh_nlambda_loop_cpp.cpp @@ -61,8 +61,8 @@ Rcpp::List hh_nlambda_loop_cpp( // theta0 <- my_values$theta0 ### iteration // beta_hat <- my_values$beta_hat // y_hat <- my_values$y_hat - } - if (parallel && pal == 0) { + } else if (parallel && pal == 0) { + // This is the default case. // beta <- my_values[hh, ]$beta // theta <- my_values[hh, ]$theta // my_obj[[hh]] <- list(my_values[hh, ]$obj) @@ -70,14 +70,8 @@ Rcpp::List hh_nlambda_loop_cpp( // 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) { - // beta <- my_values[[hh]]$beta - // theta <- my_values[[hh]]$theta - // my_obj[[hh]] <- list(my_values[[hh]]$obj) - // beta0 <- my_values[[hh]]$beta0 - // theta0 <- my_values[[hh]]$theta0 ### iteration - // beta_hat <- my_values[[hh]]$beta_hat - // y_hat <- my_values[[hh]]$y_hat + } else { + Rcpp::stop("Invalid combination of parallel and pal."); } // beta1 <- as(beta * (abs(beta) > tol), "sparseMatrix")