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 ( const T &  x,
size_t  k,
scalar_type_t< T > &  lp 
)

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values and increment the specified log probability reference with the log absolute Jacobian determinant.

The transform is defined as for cov_matrix_constrain(Matrix, size_t).

The log absolute Jacobian determinant is derived by composing the log absolute Jacobian determinant for the underlying correlation matrix as defined in cov_matrix_constrain(Matrix, size_t, T&) with the Jacobian of the transform of the correlation matrix into a covariance matrix by scaling by standard deviations.

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 67 of file cov_matrix_constrain_lkj.hpp.