Method: Statsample::Factor.anti_image_covariance_matrix
- Defined in:
- lib/statsample/factor.rb
.anti_image_covariance_matrix(matrix) ⇒ Object
Anti-image covariance matrix. Useful for inspection of desireability of data for factor analysis. According to Dziuban & Shirkey (1974, p.359):
"If this matrix does not exhibit many zero off-diagonal elements,
the investigator has evidence that the correlation
matrix is not appropriate for factor analysis."
36 37 38 39 40 41 42 |
# File 'lib/statsample/factor.rb', line 36 def self.anti_image_covariance_matrix(matrix) s2=Matrix.diagonal(*(matrix.inverse.diagonal)).inverse aicm=(s2)*matrix.inverse*(s2) aicm.extend(Statsample::CovariateMatrix) aicm.fields=matrix.fields if matrix.respond_to? :fields aicm end |