question: public void largestNonDiagonalMagnitude ( CorrelationMatrix r ) { TetradMatrix residual = r . getMatrix ( ) ; for ( int i = 0 ; i < residual . columns ( ) ; i ++ ) { double max = 0 ; for ( int j = 0 ; j < residual . columns ( ) ; j ++ ) { if ( i == j ) continue ; double temp = Math . abs ( residual . get ( j , i ) ) ; if ( temp > max ) max = temp ; } residual . set ( i , i , max ) ; } }
target:  Largest nondiagonal magnitude method. Estimates the communality (diagonal of the residual correlation matrix) as the largest nondiagonal absolute value present in each column. Tends to produce smaller numbers of factors than the unity method.