Factor predictors (as factors, logical, or character vectors) can't coexist
with numeric variables in the .predictor_value
column. If there are some
numeric and some factor predictors, the factor predictors will automatically
be omitted. If all predictors are factors, they will be combined into one
factor with all levels. However, if a numeric variable is converted to factor
in the model formula, such as with y ~ factor(x)
, the function cannot
determine the appropriate types and will raise an error. Create factors as
needed in the source data frame before fitting the model to avoid this
issue.