Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values.
The input vector must be of length \({k \choose 2} = \frac{k(k-1)}{2}\). The values in the input vector represent unconstrained (partial) correlations among the dimensions.
The transform based on partial correlations is as specified in
The free vector entries are first constrained to be valid correlation values using corr_constrain(T)
.
T | type of the vector (must be derived from Eigen::MatrixBase and have one compile-time dimension equal to 1) |
x | Vector of unconstrained partial correlations. |
k | Dimensionality of returned correlation matrix. |
std::invalid_argument | if x is not a valid correlation matrix. |
Definition at line 41 of file corr_matrix_constrain.hpp.