Takes an ordered path model and corresponding variance-covariance matrix and computes the appropriate residual covariance matrix (psi)
get_psi(B, sigma, digits = 3)input \(p \times p\) linear SEM weights matrix
variance-covariance matrix of the variables
how many digits to round the result to
a \(p \times p\) residual variance-covariance matrix