Stan Math Library
4.9.0
Automatic Differentiation
|
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.
T | type of input vector (must be a var_value<S> where S inherits from EigenBase) |
x | Input vector of unconstrained partial correlations and standard deviations. |
k | Dimensionality of returned covariance matrix. |
lp | Log probability reference to increment. |
Definition at line 67 of file cov_matrix_constrain_lkj.hpp.