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

◆ cov_matrix_free_lkj() [1/2]

template<typename T , require_eigen_t< T > * = nullptr>
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, 1 > stan::math::cov_matrix_free_lkj ( const T &  y)

Return the vector of unconstrained partial correlations and deviations that transform to the specified covariance matrix.

The constraining transform is defined as for cov_matrix_constrain(Matrix, size_t). The inverse first factors out the deviations, then applies the freeing transform of corr_matrix_free(Matrix&).

Template Parameters
Ttype of the matrix (must be derived from Eigen::MatrixBase)
Parameters
yCovariance matrix to free.
Returns
Vector of unconstrained values that transforms to the specified covariance matrix.
Exceptions
std::domain_errorif the correlation matrix has no elements or is not a square matrix.
std::runtime_errorif the correlation matrix cannot be factorized by factor_cov_matrix()

Definition at line 31 of file cov_matrix_free_lkj.hpp.