uppertri_mult_diag {nimbleMacros} | R Documentation |
uppertri_mult_diag
Description
nimbleFunction needed when fitting correlated random effects. Generates upper triangular Cholesky factor of covariance matrix ("U" in code) from upper triangular Cholesky factor of correlation matrix ("Ustar" in code) and vector of standard deviations. Taken from the NIMBLE manual, section 5.2.4.1.2 (LKJ Distribution for Correlation Matrices).
Usage
uppertri_mult_diag(mat, vec)
Arguments
mat |
upper triangular Cholesky factor of correlation matrix ("Ustar") |
vec |
vector of standard deviations for individual random effects |
Value
The upper triangular Cholesky factor of the covariance matrix.
[Package nimbleMacros version 0.1.1 Index]