MixedModels.jl
MixedModels.jl copied to clipboard
Multinomial / Categorical Outcomes
Is this package able to fit Multinomial Logistic Regression models or any other type of model with categorical/multiple discrete outcomes?
These types of models often come up when you need to choose one option out of a finite set of alternatives. They are very similar to binary logistic regression, except that the probabilities are given by the 'softmax' formula: $exp(X_j * Beta) / (1 + \sum_k X_k * Beta)$ rather than the $exp(X_j * Beta) / (1 + exp(X_j Beta))$ in a binary model.
Thanks!
Not directly. It is possible that it could be modified to do so but I don't really know enough about this model to make such modifications.
Thanks. I'm looking into how difficult it would be for me to make the modifications. Is the approach in MixedModels similar to what you describe in the lme4 theory documentation?
You could use part of the code in Econometrics.jl. That one has multinomial logistic regression. I will work on adding dispatch for ordinal logistic regression too.
You could use part of the code in Econometrics.jl. That one has multinomial logistic regression. I will work on adding dispatch for ordinal logistic regression too.
Any update on adding ordinal logistic regression?
Econometrics.jl has ordinal logistic regression. However, it doesn't support mixed models so it is a simple proportional odds logistic regression. See the example.
For multinomial models, you can achieve something similar by moving the response-categories to the predictors side. If you're trying to predict responses, you have to do a post-processing step to see what the probability is for each response, but that's relatively straightforward.
For mlogit/ologit in Econometrics.jl,
fitted(model) # Fitted values
predict(model) # Predicted probabilities
I've marked this as "big future", but it might make more sense as a spin-off package, much like clmm
in R uses lme4
internally but all of the extra multinomial bits are not in lme4
. Lean, focused packages are the Julian way.