Skip to content

Commit

Permalink
lm with intercept
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Sep 28, 2023
1 parent 81e3ffb commit 84d5515
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/ranger.R
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,10 @@ ranger <- function(formula = NULL, data = NULL, num.trees = 500, mtry = NULL,
confounders <- matrix(c(0, 0))
use.confounders <- FALSE
} else if (is.data.frame(confounders)) {
confounders <- data.matrix(confounders)
confounders <- cbind(1, data.matrix(confounders))
use.confounders <- TRUE
} else if (is.matrix(confounders)) {
confounders <- cbind(1, confounders)
use.confounders <- TRUE
} else {
stop("Error: confounders argument has to be matrix or data.frame.")
Expand Down

0 comments on commit 84d5515

Please sign in to comment.