Jacobian for matrix product



Hi all, I have a multivariate GLM with many columns in both X and Y. I want the matrix of parameters (W) to be low-rank, so I’m representing it as a transformed parameter that depends on parameters U and V:

W = U * V’

However, I’m not sure what priors to put on U and V. I’d like to do something equivalent to

W ~ normal(0, sigma),

but I’d like some help with the absolute value of the determinant of the Jacobian matrix of the transform. Alternatively, if it’s nasty to compute, I’d be interested in alternative parameterizations that are easier to work with.

Thanks in advance for any assistance!


You probably want either the Matrix Cookbook or Giles’s papers on matrix autodiff. It’s a little too hairy for me to do given my poor matrix skills.

What RStanArm does is condition the matrix using a QR decomposition. Maybe you’d want to do something like that. There’s now a case study on our web site on how that’s done and maybe there’s an exact low-rank form you could use.