Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ corr_matrix_log_jacobian_coefficients()

auto stan::math::internal::corr_matrix_log_jacobian_coefficients ( Eigen::Index  K)
inline

Return a lazy expression of the coefficients c for which the log absolute Jacobian determinant of corr_matrix_constrain is -sum_n c_n log(cosh(y_n)), in column order: the coefficient of every element of column col is K - col (equation 11 of Lewandowski, Kurowicka and Joe, 2009), with col recovered from the position by inverting cholesky_corr_position<CorrOrder::column>.

The inverse is exact, since at the first position of a column the radicand (2 K - 1)^2 - 8 pos is the perfect square (2 (K - col) - 1)^2, for which sqrt is exact, so floor never lands one column too low.

Parameters
Knumber of rows
Returns
coefficients in the order of the unconstrained vector

Definition at line 84 of file cholesky_corr_constrain.hpp.