Residual analysis for structural equation modeling