Method: Statsample::Factor::ParallelAnalysis#number_of_factors
- Defined in:
- lib/statsample/factor/parallelanalysis.rb
#number_of_factors ⇒ Object
Number of factor to retent
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/statsample/factor/parallelanalysis.rb', line 83 def number_of_factors total=0 ds_eigenvalues.vectors.to_a.each_with_index do |f,i| if (@original[i]>0 and @original[i]>ds_eigenvalues[f].percentil(percentil)) total+=1 else break end end total end |