fix: cve model.matrix bug
This commit is contained in:
parent
ad7ae9eeec
commit
e93bfdda05
|
@ -174,7 +174,7 @@ cve <- function(formula, data, method = "mean", max.dim = 10L, ...) {
|
|||
# extract `X`, `Y` from `formula` with `data`
|
||||
model <- stats::model.frame(formula, data)
|
||||
Y <- stats::model.response(model, "double")
|
||||
X <- stats::model.matrix(model)
|
||||
X <- stats::model.matrix(model, data)
|
||||
if ("(Intercept)" %in% colnames(X)) {
|
||||
X <- X[, "(Intercept)" != colnames(X), drop = FALSE]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue