Skip to content

Commit

Permalink
Bug fixed in X_olsc that corrupted centering in brandomc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Almond-S committed May 1, 2024
1 parent 7272361 commit 6c172c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/baselearners.R
Original file line number Diff line number Diff line change
Expand Up @@ -2368,9 +2368,11 @@ X_olsc <- function(mf, vary, args) {
args$contrasts.arg <- NULL
}
X <- model.matrix(as.formula(fm), data = mf, contrasts.arg = args$contrasts.arg)
if (DUMMY)
if (DUMMY) {
attr(X, "contrasts") <- lapply(attr(X, "contrasts"),
function(x) x <- "contr.dummy")
args$contrasts.arg <- "contr.dummy"
}
contr <- attr(X, "contrasts")
if (!args$intercept)
X <- X[ , -1, drop = FALSE]
Expand Down

0 comments on commit 6c172c5

Please sign in to comment.