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).
uppertri_mult_diag(mat, vec)The upper triangular Cholesky factor of the covariance matrix.
upper triangular Cholesky factor of correlation matrix ("Ustar")
vector of standard deviations for individual random effects