Method: Statsample::Factor.kmo
- Defined in:
- lib/statsample/factor.rb
.kmo(matrix) ⇒ Object
Kaiser-Meyer-Olkin measure of sampling adequacy for correlation matrix.
Kaiser’s (1974, cited on Dziuban & Shirkey, 1974) present calibration of the index is as follows :
-
.90s—marvelous
-
.80s— meritorious
-
.70s—middling
-
.60s—mediocre
-
.50s—miserable
-
.50 •—unacceptable
62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/statsample/factor.rb', line 62 def self.kmo(matrix) q=anti_image_correlation_matrix(matrix) n=matrix.row_size sum_r,sum_q=0,0 n.times do |j| n.times do |k| if j!=k sum_r+=matrix[j,k]**2 sum_q+=q[j,k]**2 end end end sum_r.quo(sum_r+sum_q) end |