Dear group,
I’m interested in multinomial analysis with INLA and would like to ask some questions about the multinomial-poisson transformation, which is new to me.
Firstly, the FAQ says that multinomial likelihood is not implemented in INLA and suggests using the multinomial-poisson transformation. However, I do not understand the by large uncommented example code (what is idx, jdx? why does it use weights? Also it does not run because "u" is not defined); and the link to the WinBugs manual is dead. I would be happy to provide a new code example once I understand the multinomial-poisson transformation.
If I understand the multinomial-poisson transformation correctly, I have to follow these quite simple steps in order to perform a multinomial analysis with INLA:
Suppose there are K outcome categories 1..k.
1. Organize the data set such that the new outcome variable is the count of cases where the outcome category K has been realized for any combination of covariates, that is, every combination of covariates has K lines is the data set (see also Guimaraes 2004 Understanding the MP-transf.,
http://www.stata-journal.com/sjpdf.html?articlenum=st0069)
2. For each covariate, construct a new variable as an interaction with the outcome category variable. Every covariate now has K times as many possible values.
3. Set these new variables to NA if K==1 OR the old covariate == 1 (Reference categories, this might be optional?), see alligator code.
4. Create as a new covariate a categorial variable that has the same value for every combination of covariates. There will be K instances of every value of that new covariate. (Or, add K dummy variables that are 1 if the category k has been realized and 0 otherwise, as Guimaraes suggests).
5. Specify the model family as poisson. Specify the formula as the count of cases ~ covariates, and add an "iid" model component based on the new covariate with fixed and arbitrarily small precision. Remove the intercept (-1). (See alligator code).
6. Run the model using INLA. The idea of the multinomial-poisson transformation is that the maximization of the coefficients of the new model component is mathematically equivalent to enforcing the restriction that p_1 + p_2 + ... + p_k = 1 (which is actually quite amazing).
The disadvantage of the multinomial-poisson distribution however is that
it only works with categorial covariates (see Tsodikov and Chefo 2008,
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2516948/ , who come up with an even more complicated solution).
But what exactly does that mean?
From 2. and 4. it follows that the number of values of covariates must be limited, otherwise it would be impossible to speak of "every combination of covariates". But does that mean that all model components of covariates must be of type "iid", or can I use "ar1" and "rw2" type smoothing of covariate coefficients?
Since I now have K times as much possible values for all covariates, I would need to specify which values of the new covariates are "neighbours" (that is, the pairs of old covariate:outcome categories 1:1, 2:1 and 3:1 are neigbours, and 1:2, 2:2 and 3:2 are also neighbours, but possibly with different hyperparameters, and in some way 1:1, 1:2, ... 1:k are also neigbours and so on).
Is that possible, and if yes, how would I specify it?
Note also that there is a multinomINLA package by Facundo Munoz (see
https://github.com/famuvie/multinomINLA), it seems to be that it does something similar to what I summarized in steps 1-5, but I am not sure of that.
I would be grateful for any comments.
Regards,
Martin Zuba
Vienna University of Economics and Business