SyntaxFix
Write A Post
Hire A Developer
Questions
You can also manually tag the column with a contrasts attribute, which seems to be respected by the regression functions:
contrasts
contrasts(df$factorcol) <- contr.treatment(levels(df$factorcol), base=which(levels(df$factorcol) == 'RefLevel'))