> On Mar 6, 2015, at 7:06 PM, Luc Coffeng <
lucco...@gmail.com> wrote:
>
> Thanks for clarifying! Regarding the following piece:
>
> vector[M] theta_raw[M];
> for (m in 1:M)
> theta_raw[m] ~ multi_normal...
>
> This assumes that for a given individual, the columns
I always get confused because the choice of row vs. column
is arbitrary.
What matters is that for each state m there is a simplex
of transition probabilities to each possible next state 1,...,M.
What I was suggesting is that you model the states hierarchically
with a multivariate logistic prior. That allows for modeling
covariance among the transitions. For instance, transitions to m1
may be correlated with transitions to m2.
> of the final transition matrix M are i.i.d. following the multinormal distribution.
Not quite --- it's multivariate logistic. You could
also do multivariate probit by using the probit link
function (cumulative normal Phi).
> Not sure whether this is valid for this particular application. It might well be that the transition probability M[1,2] is correlated with transition probability M[2,3].
Without replicates, there'll be no way to estimate that. What
I was suggesting has M replicates, one for each state.
Of course, if you have bunches of problems with the same HMM
state structure then you could do it.
Then I think you could generalize to matrix normal distributions,
which I believe Rob's about to add to Stan:
http://en.wikipedia.org/wiki/Matrix_normal_distribution
> To capture that, one would have to define theta_raw as a vector of length m^2 and evaluate that with a M^2-dimensional multinormal distribution, and then do the softmax transform on each of the m sets of m-length theta_raws.
>
> (Theta_raw needs to be constrained to be positive.)
The point was that theta_raw is unconstrained and each
set of outgoing transition probabilities theta_raw[m] can
be normalized to a simplex softmax(theta_raw[m]). That induces
a hierarchical structure on the outgoing transitions that allows
correlation between the targets. You could do the same kind of
thing with the Dirichlet, which gives you mean and variance, but
not covariance.
- Bob