transform the estimated upper triangular Cholesky factor into the correlation matrix

37 views
Skip to first unread message

SIWEI PENG

unread,
Oct 13, 2023, 3:47:19 PM10/13/23
to nimble-users
Hi everyone,

Stan has two different distributions for modeling correlation matrices: `lkj_corr_cholesky` and `lkj_corr`. However, in Nimble, when I used the " lkj_corr_cholesky " to estimate the upper triangular Cholesky factor, how do I transform it into the correlation matrix?

Chris Paciorek

unread,
Oct 16, 2023, 2:51:49 PM10/16/23
to SIWEI PENG, nimble-users
hi Siwei,

It's the usual relationship between a Cholesky factor and the matrix:  take `t(U) %*% U` to get the correlation matrix.

-chris

On Fri, Oct 13, 2023 at 12:47 PM 'SIWEI PENG' via nimble-users <nimble...@googlegroups.com> wrote:
Hi everyone,

Stan has two different distributions for modeling correlation matrices: `lkj_corr_cholesky` and `lkj_corr`. However, in Nimble, when I used the " lkj_corr_cholesky " to estimate the upper triangular Cholesky factor, how do I transform it into the correlation matrix?

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/7818f19f-1ad8-4d77-a524-95a52854d091n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages