Open AmeliaMN opened 1 year ago
The function emplogitplot2 only works if the categorical variable you are providing is formatted as a factor. If not, you get the opaque error message
emplogitplot2
Error in eval(predvars, data, env) : object 'Logit' not found
For example, if we take the MedGPA data used in the documentation and transform Sex back into a character variable,
MedGPA
Sex
MedGPA <- MedGPA %>% mutate(Sex = as.character(Sex))
Then running
emplogitplot2(Acceptance~GPA+Sex,data=MedGPA)
returns
An error message like No factor variable found, please ensure your categorical variable is of the type factor would be much easier to interpret.
No factor variable found, please ensure your categorical variable is of the type factor
The function
emplogitplot2
only works if the categorical variable you are providing is formatted as a factor. If not, you get the opaque error messageFor example, if we take the
MedGPA
data used in the documentation and transformSex
back into a character variable,Then running
returns
An error message like
No factor variable found, please ensure your categorical variable is of the type factor
would be much easier to interpret.