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

◆ cov_matrix_constrain_lkj() [1/5]

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

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values.

The input vector must be of length \(k \choose 2 + k\). The first \(k \choose 2\) values in the input represent unconstrained (partial) correlations and the last \(k\) are unconstrained standard deviations of the dimensions.

The transform scales the correlation matrix transform defined in corr_matrix_constrain(Matrix, size_t) with the constrained deviations.

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

Definition at line 35 of file cov_matrix_constrain_lkj.hpp.