Kronecker Product with Vector

Ever figure this out, @cbeck? I’m implementing what sounds like a similar model (the Gelfand (2003) SVC). and wondering how you solved this.

Hi @ljwolf, I didn’t end up figuring this out and went in a different direction with the paper. Sorry!

OK, good to know. Similarly, I’ve figured it out in pymc3! Thanks!

To resolve this in stan, I’ve tried using a non-centered parameterization. I take the cholesky factorization of the N \times N spatial kernel H(\phi) and P \times P process covariance \Sigma:
\mathbf{H}(\phi) = \mathbf{LL}^T
\Sigma = \mathbf{KK}^T

then define the offsets for the local smooths, \mathbf{B}:
\mathbf{B} \sim \mathcal{N}_{N,P}(0,1)
and exploit the properties of the matrix normal:
\beta = \mu_s + \mathbf{LBK}^T

which then gives the predictions as:
y \sim \mathcal{N}((\mathbf{X} \circ \beta)\mathbf{1}_P , \sigma^2)

There’s probably a better way to do geographic gaussian processes in stan, but just trying to replicate earlier work for now, and this is only a workaround for the original question posed in this thread.

scratch.stan (2.3 KB)

2 Likes