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

◆ factor_cov_matrix()

template<typename T_Sigma , typename T_CPCs , typename T_sds , require_eigen_t< T_Sigma > * = nullptr, require_all_eigen_vector_t< T_CPCs, T_sds > * = nullptr, require_all_vt_same< T_Sigma, T_CPCs, T_sds > * = nullptr>
bool stan::math::factor_cov_matrix ( const T_Sigma &  Sigma,
T_CPCs &&  CPCs,
T_sds &&  sds 
)

This function is intended to make starting values, given a covariance matrix Sigma.

The transformations are hard coded as log for standard deviations and Fisher transformations (atanh()) of CPCs

Template Parameters
Ttype of elements in the matrix and arrays
Parameters
[in]Sigmacovariance matrix
[out]CPCsfill this unbounded (does not resize)
[out]sdsfill this unbounded
Returns
false if any of the diagonals of Sigma are 0

Definition at line 28 of file factor_cov_matrix.hpp.