I am a newbie trying to use STAN for a very specific problem.
Has anyone tried to code a hierarchical multi-logit regression??? I am in marketing and am doing Conjoint Analysis. I was given some legacy WinBugs codes by my employer, but I am trying to switch to STAN.
I am following Examples 8.6 and 8.9 from the user manual and hoping to combine and modify those STAN codes. But I find myself having to declare a 3-dimensional matrix for the beta coefficients - for all the possible choice outcomes (K), for all the attributes (D), and for all the people (L).
matrix [K,D] mu;
matrix [K,D] sigma;
matrix [K, D, L] beta;
My questions are:
- Is 3-dimensional matrix even allowed in STAN?
- The manual seems to suggest that an array of vectors is more efficient than matrices. But I don’t know how to express a 3-dim matrix as an array of vectors…
Sorry if my questions are too basic. Any help is appreciated.