Closed sahirbhatnagar closed 5 years ago
I think the error comes from:
newform <- as.formula(update(formula, paste(".~", paste(rownames(crrstep.fit$coefficients),
collapse = "+"))), env = NULL)
because rownames(crrstep.fit$coefficients)
returns coefficients for each level of the categorical predictor which wont be found in the data. So maybe I should be sending model.matrix
to the data
argument ?
yes, the best solution is that you prepare the data using model.matrix. I am not very motivated to fix this function myself but will write to the author of the function ...
When one of the variables is a factor,
selectFGR
returns an error. Here is a reproducible example:Created on 2019-04-16 by the reprex package (v0.2.1)