diff --git a/CVE/R/CVE.R b/CVE/R/CVE.R index 6ec0e27..1fcd4bf 100644 --- a/CVE/R/CVE.R +++ b/CVE/R/CVE.R @@ -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] }