Suppose I wanted to have a dynamic correlation matrix, where the evolution over time is smooth.
I want to do this by assigning a random walk prior on the cholesky factors.
As far as I understand, I can’t use the lkj prior for this, because even if I specify a smooth prior on the eta parameter in that distribution, that does not guarantee the factors will be smooth across time-points. So I end up assigning random walk priors to the cholesky factors via normal distribution.
If I simulate this sort of scenario in R for T = 365, and I get some sensible behaviour – as I increase the value of the sd in the random walk, the correlations get less smooth, and vice-versa.
I’m implementing this in Stan by:
transformed parameters {
...
array[fte_N] matrix[choice_N,choice_N] L; // covariance matrix
// define covariance matrix on daily changes in support
for(t in 1:fte_N) L[t] = diag_pre_multiply(delta_scale, L_Omega[t]);
...
}
model {
// covariance priors
// magnitude of daily change in cholesky factors
sd_L_Omega ~ std_normal();
// RW prior on cholesky factors for dynamic correlation matrix
to_vector(L_Omega[1]) ~ std_normal();
for(t in 2:fte_N) to_vector(L_Omega[t]) ~ normal(to_vector(L_Omega[t-1]),sd_L_Omega);
...
}
This seems to work, but it’s rather slow – I’m wondering if there is a more efficient way of specifying this model ? Are there any obvious reasons I should not be doing this ? (i.e. very ill-advised to use a normal prior on the cholesky factors) ? Thanks !