In Stage 2, the genetic covariance matrix obtained in the previous stage, S, is used to estimate the parameters in a SEM. In this stage, we allow for both weighted least squares (WLS) and normal theory maximum likelihood (ML) estimators. WLS does not strictly require positive definite S and VS matrices, but may still benefit from positive definiteness during optimization. ML estimation requires both S and VS to be positive definite. The GenomicSEM software package therefore smooths S and VS to the nearest positive definite matrices prior to Stage 2 estimation using the R function nearPD.45