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

◆ cov_matrix_constrain_lkj() [2/5]

template<typename T , require_eigen_col_vector_t< T > * = nullptr>
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > stan::math::cov_matrix_constrain_lkj ( T &&  x,
size_t  k,
return_type_t< T > &  lp 
)
inline

Return the covariance matrix as cov_matrix_constrain_lkj(x, k) and add the log absolute Jacobian determinant to lp.

The Jacobian is the one of corr_matrix_constrain plus k log 2 + (k + 1) sum(x.tail(k)).

Template Parameters
Ttype of the vector (must be derived from Eigen::MatrixBase and have one compile-time column)
Parameters
xInput vector of unconstrained partial correlations and standard deviations.
kDimensionality of returned covariance matrix.
lpLog probability reference to increment.
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.

Definition at line 65 of file cov_matrix_constrain_lkj.hpp.