I would like to fit a multinomial multilevel logistic Model. Unfortunately I couldn't find a package that implements this. I tried Stata
's gsem
but it is very very slow and does not converge. This is why I was wondering if it is possible to estimate contrasting binomial models, combine them and approximate the multinomial-model.
So I came up with an approach but got stuck at the "combining" part. Two questions:
- Is my approach correct/doable?
- If yes, how do I calculate predictions for the base category
Approach:
The Data $ D $ has an dependent variable $ y \in \{1,2,3\} $.
I split my data in two subsets: $ D_{1,2} $ and $ D_{1,3} $. Where $D_{1,2}$ consists of all rows with $ y \in \{1,2\};$
$D_{2,3}$ of all where $y \in \{1,3\}$
Now I calculated the model $$ logit(p_i) = \ln\left(\frac{P(Y_i = 1)}{1-P(Y_i = 1)}\right)=\dots $$
With $i \in \{1,2\}$ corresponding to the Dataset $D_{1,i}$ and $\dots$ symbolizes the model-specification. Predicting this model I get predictions $\hat{p_i}$ meaning the likelihood of taking alternative $i$ over $1$.
Denoting $\hat{p_i}$ = pi^
the resulting Data-Set would look as follows:
y p2^ p3^
1 0.2 0.1
1 0.7 0.8
2 0.6 .
3 . 0.1
...
This leads to my second question:
If I want to predict $\hat y$, what do I have to do? And how do I calculate the probability of p1^
meaning the likelihood of taking 1 over 2 & 3.
I am thankful for any help!