statsample 1.4.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/History.txt +8 -0
  3. data/benchmarks/correlation_matrix_15_variables.rb +1 -1
  4. data/benchmarks/correlation_matrix_5_variables.rb +1 -1
  5. data/benchmarks/correlation_matrix_methods/correlation_matrix.rb +2 -2
  6. data/examples/dataset.rb +2 -2
  7. data/examples/icc.rb +1 -1
  8. data/examples/levene.rb +2 -2
  9. data/examples/parallel_analysis.rb +1 -1
  10. data/examples/u_test.rb +2 -2
  11. data/examples/vector.rb +1 -1
  12. data/examples/velicer_map_test.rb +1 -1
  13. data/lib/statsample.rb +30 -4
  14. data/lib/statsample/anova/oneway.rb +3 -3
  15. data/lib/statsample/anova/twoway.rb +3 -3
  16. data/lib/statsample/bivariate.rb +7 -7
  17. data/lib/statsample/bivariate/pearson.rb +2 -2
  18. data/lib/statsample/converter/csv.rb +1 -1
  19. data/lib/statsample/converters.rb +7 -7
  20. data/lib/statsample/dataset.rb +8 -8
  21. data/lib/statsample/dominanceanalysis.rb +4 -4
  22. data/lib/statsample/dominanceanalysis/bootstrap.rb +8 -8
  23. data/lib/statsample/factor.rb +2 -4
  24. data/lib/statsample/factor/map.rb +2 -1
  25. data/lib/statsample/factor/parallelanalysis.rb +2 -2
  26. data/lib/statsample/factor/pca.rb +2 -2
  27. data/lib/statsample/factor/principalaxis.rb +2 -2
  28. data/lib/statsample/graph/boxplot.rb +4 -4
  29. data/lib/statsample/graph/histogram.rb +2 -2
  30. data/lib/statsample/graph/scatterplot.rb +4 -4
  31. data/lib/statsample/matrix.rb +20 -6
  32. data/lib/statsample/regression.rb +2 -2
  33. data/lib/statsample/regression/multiple.rb +3 -3
  34. data/lib/statsample/regression/multiple/alglibengine.rb +5 -5
  35. data/lib/statsample/regression/multiple/baseengine.rb +3 -3
  36. data/lib/statsample/regression/multiple/gslengine.rb +5 -5
  37. data/lib/statsample/regression/multiple/rubyengine.rb +4 -4
  38. data/lib/statsample/reliability/icc.rb +1 -1
  39. data/lib/statsample/reliability/multiscaleanalysis.rb +4 -4
  40. data/lib/statsample/reliability/scaleanalysis.rb +6 -6
  41. data/lib/statsample/reliability/skillscaleanalysis.rb +1 -1
  42. data/lib/statsample/resample.rb +1 -1
  43. data/lib/statsample/shorthand.rb +1 -1
  44. data/lib/statsample/test/bartlettsphericity.rb +1 -1
  45. data/lib/statsample/test/levene.rb +4 -4
  46. data/lib/statsample/test/t.rb +3 -3
  47. data/lib/statsample/test/umannwhitney.rb +2 -2
  48. data/lib/statsample/vector.rb +103 -80
  49. data/lib/statsample/vector/gsl.rb +16 -16
  50. data/lib/statsample/version.rb +1 -1
  51. data/test/test_analysis.rb +1 -1
  52. data/test/test_anova_contrast.rb +4 -4
  53. data/test/test_anovatwowaywithdataset.rb +1 -1
  54. data/test/test_anovawithvectors.rb +6 -6
  55. data/test/test_awesome_print_bug.rb +1 -1
  56. data/test/test_bartlettsphericity.rb +3 -3
  57. data/test/test_bivariate.rb +38 -38
  58. data/test/test_crosstab.rb +2 -2
  59. data/test/test_csv.rb +6 -6
  60. data/test/test_dataset.rb +79 -79
  61. data/test/test_factor.rb +55 -49
  62. data/test/test_factor_pa.rb +4 -4
  63. data/test/test_ggobi.rb +3 -3
  64. data/test/test_gsl.rb +3 -3
  65. data/test/test_histogram.rb +3 -3
  66. data/test/test_matrix.rb +5 -5
  67. data/test/test_multiset.rb +19 -19
  68. data/test/test_regression.rb +27 -27
  69. data/test/test_reliability.rb +14 -14
  70. data/test/test_reliability_icc.rb +7 -7
  71. data/test/test_reliability_skillscale.rb +6 -6
  72. data/test/test_resample.rb +1 -1
  73. data/test/test_rserve_extension.rb +4 -4
  74. data/test/test_statistics.rb +5 -5
  75. data/test/test_stest.rb +8 -8
  76. data/test/test_stratified.rb +3 -3
  77. data/test/test_test_t.rb +5 -5
  78. data/test/test_umannwhitney.rb +2 -2
  79. data/test/test_vector.rb +153 -119
  80. data/test/test_wilcoxonsignedrank.rb +4 -4
  81. data/test/test_xls.rb +6 -6
  82. metadata +3 -53
@@ -5,8 +5,8 @@ class StatsampleUMannWhitneyTestCase < Minitest::Test
5
5
  context Statsample::Test::WilcoxonSignedRank do
6
6
  context 'Example 1' do
7
7
  setup do
8
- @v1 = [110, 122, 125, 120, 140, 124, 123, 137, 135, 145].to_scale
9
- @v2 = [125, 115, 130, 140, 140, 115, 140, 125, 140, 135].to_scale
8
+ @v1 = [110, 122, 125, 120, 140, 124, 123, 137, 135, 145].to_numeric
9
+ @v2 = [125, 115, 130, 140, 140, 115, 140, 125, 140, 135].to_numeric
10
10
  @u = Statsample::Test::WilcoxonSignedRank.new(@v1, @v2)
11
11
  end
12
12
  should 'have same result using class or Test#u_mannwhitney' do
@@ -34,8 +34,8 @@ class StatsampleUMannWhitneyTestCase < Minitest::Test
34
34
 
35
35
  context 'Example 2' do
36
36
  setup do
37
- @v2 = [78, 24, 64, 45, 64, 52, 30, 50, 64, 50, 78, 22, 84, 40, 90, 72].to_scale
38
- @v1 = [78, 24, 62, 48, 68, 56, 25, 44, 56, 40, 68, 36, 68, 20, 58, 32].to_scale
37
+ @v2 = [78, 24, 64, 45, 64, 52, 30, 50, 64, 50, 78, 22, 84, 40, 90, 72].to_numeric
38
+ @v1 = [78, 24, 62, 48, 68, 56, 25, 44, 56, 40, 68, 36, 68, 20, 58, 32].to_numeric
39
39
  @u = Statsample::Test::WilcoxonSignedRank.new(@v1, @v2)
40
40
  end
41
41
  should 'have same result using class or Test#u_mannwhitney' do
@@ -11,11 +11,11 @@ class StatsampleExcelTestCase < Minitest::Test
11
11
  assert_equal(%w(id name age city a1), @ds.fields)
12
12
  end
13
13
  should 'set a dataset equal to expected' do
14
- id = [1, 2, 3, 4, 5, 6].to_vector(:scale)
15
- name = %w(Alex Claude Peter Franz George Fernand).to_vector(:nominal)
16
- age = [20, 23, 25, nil, 5.5, nil].to_vector(:scale)
17
- city = ['New York', 'London', 'London', 'Paris', 'Tome', nil].to_vector(:nominal)
18
- a1 = ['a,b', 'b,c', 'a', nil, 'a,b,c', nil].to_vector(:nominal)
14
+ id = [1, 2, 3, 4, 5, 6].to_vector(:numeric)
15
+ name = %w(Alex Claude Peter Franz George Fernand).to_vector(:object)
16
+ age = [20, 23, 25, nil, 5.5, nil].to_vector(:numeric)
17
+ city = ['New York', 'London', 'London', 'Paris', 'Tome', nil].to_vector(:object)
18
+ a1 = ['a,b', 'b,c', 'a', nil, 'a,b,c', nil].to_vector(:object)
19
19
  ds_exp = Statsample::Dataset.new({ 'id' => id, 'name' => name, 'age' => age, 'city' => city, 'a1' => a1 }, %w(id name age city a1))
20
20
  ds_exp.fields.each{|f|
21
21
  assert_equal(ds_exp[f], @ds[f])
@@ -28,7 +28,7 @@ class StatsampleExcelTestCase < Minitest::Test
28
28
  end
29
29
  context 'Excel writer' do
30
30
  setup do
31
- a = 100.times.map { rand(100) }.to_scale
31
+ a = 100.times.map { rand(100) }.to_numeric
32
32
  b = (['b'] * 100).to_vector
33
33
  @ds = { 'b' => b, 'a' => a }.to_dataset(%w(b a))
34
34
  tempfile = Tempfile.new('test_write.xls')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsample
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Bustos
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-27 00:00:00.000000000 Z
12
+ date: 2015-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spreadsheet
@@ -480,54 +480,4 @@ rubygems_version: 2.4.5
480
480
  signing_key:
481
481
  specification_version: 4
482
482
  summary: A suite for basic and advanced statistics on Ruby
483
- test_files:
484
- - test/fixtures/bank2.dat
485
- - test/fixtures/correlation_matrix.rb
486
- - test/fixtures/hartman_23.matrix
487
- - test/fixtures/repeated_fields.csv
488
- - test/fixtures/scientific_notation.csv
489
- - test/fixtures/stock_data.csv
490
- - test/fixtures/test_csv.csv
491
- - test/fixtures/test_xls.xls
492
- - test/fixtures/tetmat_matrix.txt
493
- - test/fixtures/tetmat_test.txt
494
- - test/helpers_tests.rb
495
- - test/test_analysis.rb
496
- - test/test_anova_contrast.rb
497
- - test/test_anovaoneway.rb
498
- - test/test_anovatwoway.rb
499
- - test/test_anovatwowaywithdataset.rb
500
- - test/test_anovawithvectors.rb
501
- - test/test_awesome_print_bug.rb
502
- - test/test_bartlettsphericity.rb
503
- - test/test_bivariate.rb
504
- - test/test_codification.rb
505
- - test/test_crosstab.rb
506
- - test/test_csv.rb
507
- - test/test_dataset.rb
508
- - test/test_dominance_analysis.rb
509
- - test/test_factor.rb
510
- - test/test_factor_map.rb
511
- - test/test_factor_pa.rb
512
- - test/test_ggobi.rb
513
- - test/test_gsl.rb
514
- - test/test_histogram.rb
515
- - test/test_matrix.rb
516
- - test/test_multiset.rb
517
- - test/test_regression.rb
518
- - test/test_reliability.rb
519
- - test/test_reliability_icc.rb
520
- - test/test_reliability_skillscale.rb
521
- - test/test_resample.rb
522
- - test/test_rserve_extension.rb
523
- - test/test_srs.rb
524
- - test/test_statistics.rb
525
- - test/test_stest.rb
526
- - test/test_stratified.rb
527
- - test/test_test_f.rb
528
- - test/test_test_kolmogorovsmirnov.rb
529
- - test/test_test_t.rb
530
- - test/test_umannwhitney.rb
531
- - test/test_vector.rb
532
- - test/test_wilcoxonsignedrank.rb
533
- - test/test_xls.rb
483
+ test_files: []