R/helper-intercept.r
no_intercept.Rd
Often, we prefer not to have an intercept term in a model, but user-specified formulas might have included the intercept term. In this case, we wish to update the formula but without the intercept term. This is especially true in numerous classification models, where errors and doom can occur if an intercept is included in the model.
no_intercept(formula, data)
formula | a model formula to remove its intercept term |
---|---|
data | data frame |
formula with no intercept term
#> Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width - #> 1 #> <environment: 0x5594a4dc9728>