Skip to content

Commit 6c172c5

Browse files
committed
Bug fixed in X_olsc that corrupted centering in brandomc.
1 parent 7272361 commit 6c172c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/baselearners.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -2368,9 +2368,11 @@ X_olsc <- function(mf, vary, args) {
23682368
args$contrasts.arg <- NULL
23692369
}
23702370
X <- model.matrix(as.formula(fm), data = mf, contrasts.arg = args$contrasts.arg)
2371-
if (DUMMY)
2371+
if (DUMMY) {
23722372
attr(X, "contrasts") <- lapply(attr(X, "contrasts"),
23732373
function(x) x <- "contr.dummy")
2374+
args$contrasts.arg <- "contr.dummy"
2375+
}
23742376
contr <- attr(X, "contrasts")
23752377
if (!args$intercept)
23762378
X <- X[ , -1, drop = FALSE]

0 commit comments

Comments
 (0)