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

◆ cov_matrix_constrain_lkj() [5/5]

template<typename T , require_var_vector_t< T > * = nullptr>
var_value< Eigen::MatrixXd > stan::math::cov_matrix_constrain_lkj ( T &&  x,
size_t  k,
scalar_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 input vector (must be a var_value<S> where S inherits from EigenBase)
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 63 of file cov_matrix_constrain_lkj.hpp.