As my first question addressing this matter was incomplete and unclear, I made another attempt with an improved outline. I am currently working on a project in which I have a data-set of the following form:
$id_A \quad id_M \quad x_1 \quad x_2 \quad Link$
$1\quad\quad 1\quad\quad 1 \quad \quad 3 \quad\quad 1$
$1\quad\quad 2\quad\quad 3 \quad \quad 2 \quad\quad 0$
$1\quad\quad 3\quad\quad 2 \quad \quad 2 \quad\quad 0$
$2\quad\quad 1\quad\quad 4 \quad \quad 6 \quad\quad 0$
$2\quad\quad 2\quad\quad 5 \quad \quad 7 \quad\quad 1$
$2\quad\quad 3\quad\quad 4 \quad \quad 3 \quad\quad 0$
Here, there are 3 alternatives M = 1,2,3 from which every individual A has to choose. The realized choice stored in the binary variable $Link$. I want to model this choice as a conditional logit (or perhaps probit, I would love to be able to implement both and see which one performs better) model. This means that I would like to input a matrix (or data.frame subset) for each $id_A$ containing the different interaction values $x_1,x_2$ for each $M$. I then want to predict the probabilities of choosing a certain $M$ for that $A$, based on these $x_1,x_2$. So, I want a vector containing values $P_M = P(id_A \text{ } chooses \text{ } M)$ for each $A$ that I input. These probabilities need to satisfy that they sum to 1. However, I do not know how to implement this in R, through existing packages. I could of course use maximum likelihood and write optimization code myself, but I think that dedicated packages would be more efficient.
I looked at functions like multinom from nnet, but they seem to treat the different alternatives separately, while I would like to really implement it like it is suggested in the section Conditional Likelihood on this Wikipedia page:
https://en.wikipedia.org/wiki/Conditional_logistic_regression
To clarify: I want to have that the coefficients between alternatives $M$ do NOT vary, so I am not looking at multinomial logistic regression, see below:
https://en.wikipedia.org/wiki/Multinomial_logistic_regression
Just two small remarks that might be important, and that should be taken into account:
- In general, I will have many alternatives $M$, not just three. They are not ordinal.
- After estimating the model, I want to be able to find new probabilities, after leaving one of the alternatives $M$ out, by just leaving away the corresponding rows in my data. It is not disastrous if this is not possible, but it is highly preferable.