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

◆ cov_matrix_constrain_lkj() [1/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 
)
inline

Return the k x k covariance matrix (diag(sds) L) (diag(sds) L)^T, with L the Cholesky factor of the correlation matrix of the first k choose 2 unconstrained values and sds = exp(x.tail(k)).

See corr_matrix_constrain for the correlation transform.

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.
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.

Definition at line 37 of file cov_matrix_constrain_lkj.hpp.