I have noticed that I could not use a CategoricalArray as the dependent variable for a logistic regression. When I convert the binary dependent variable into a Float64, then I can estimate the model without any problem.
Question 1: Is there any way that GLM be modified such that it takes a CategoricalArray as the dependent variable?
I think this is a nice service to the users, especially for models that require binary values in the dependent variable.
Question 2: Is there an example of how to use “contrasts” in the GLM model? I have a CategoricalArray with 4 levels and want to use level “2” as the base. I have read the StatsModels documentation on DummyCoding() but could not make it work.