statsample 1.4.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.txt +8 -0
- data/benchmarks/correlation_matrix_15_variables.rb +1 -1
- data/benchmarks/correlation_matrix_5_variables.rb +1 -1
- data/benchmarks/correlation_matrix_methods/correlation_matrix.rb +2 -2
- data/examples/dataset.rb +2 -2
- data/examples/icc.rb +1 -1
- data/examples/levene.rb +2 -2
- data/examples/parallel_analysis.rb +1 -1
- data/examples/u_test.rb +2 -2
- data/examples/vector.rb +1 -1
- data/examples/velicer_map_test.rb +1 -1
- data/lib/statsample.rb +30 -4
- data/lib/statsample/anova/oneway.rb +3 -3
- data/lib/statsample/anova/twoway.rb +3 -3
- data/lib/statsample/bivariate.rb +7 -7
- data/lib/statsample/bivariate/pearson.rb +2 -2
- data/lib/statsample/converter/csv.rb +1 -1
- data/lib/statsample/converters.rb +7 -7
- data/lib/statsample/dataset.rb +8 -8
- data/lib/statsample/dominanceanalysis.rb +4 -4
- data/lib/statsample/dominanceanalysis/bootstrap.rb +8 -8
- data/lib/statsample/factor.rb +2 -4
- data/lib/statsample/factor/map.rb +2 -1
- data/lib/statsample/factor/parallelanalysis.rb +2 -2
- data/lib/statsample/factor/pca.rb +2 -2
- data/lib/statsample/factor/principalaxis.rb +2 -2
- data/lib/statsample/graph/boxplot.rb +4 -4
- data/lib/statsample/graph/histogram.rb +2 -2
- data/lib/statsample/graph/scatterplot.rb +4 -4
- data/lib/statsample/matrix.rb +20 -6
- data/lib/statsample/regression.rb +2 -2
- data/lib/statsample/regression/multiple.rb +3 -3
- data/lib/statsample/regression/multiple/alglibengine.rb +5 -5
- data/lib/statsample/regression/multiple/baseengine.rb +3 -3
- data/lib/statsample/regression/multiple/gslengine.rb +5 -5
- data/lib/statsample/regression/multiple/rubyengine.rb +4 -4
- data/lib/statsample/reliability/icc.rb +1 -1
- data/lib/statsample/reliability/multiscaleanalysis.rb +4 -4
- data/lib/statsample/reliability/scaleanalysis.rb +6 -6
- data/lib/statsample/reliability/skillscaleanalysis.rb +1 -1
- data/lib/statsample/resample.rb +1 -1
- data/lib/statsample/shorthand.rb +1 -1
- data/lib/statsample/test/bartlettsphericity.rb +1 -1
- data/lib/statsample/test/levene.rb +4 -4
- data/lib/statsample/test/t.rb +3 -3
- data/lib/statsample/test/umannwhitney.rb +2 -2
- data/lib/statsample/vector.rb +103 -80
- data/lib/statsample/vector/gsl.rb +16 -16
- data/lib/statsample/version.rb +1 -1
- data/test/test_analysis.rb +1 -1
- data/test/test_anova_contrast.rb +4 -4
- data/test/test_anovatwowaywithdataset.rb +1 -1
- data/test/test_anovawithvectors.rb +6 -6
- data/test/test_awesome_print_bug.rb +1 -1
- data/test/test_bartlettsphericity.rb +3 -3
- data/test/test_bivariate.rb +38 -38
- data/test/test_crosstab.rb +2 -2
- data/test/test_csv.rb +6 -6
- data/test/test_dataset.rb +79 -79
- data/test/test_factor.rb +55 -49
- data/test/test_factor_pa.rb +4 -4
- data/test/test_ggobi.rb +3 -3
- data/test/test_gsl.rb +3 -3
- data/test/test_histogram.rb +3 -3
- data/test/test_matrix.rb +5 -5
- data/test/test_multiset.rb +19 -19
- data/test/test_regression.rb +27 -27
- data/test/test_reliability.rb +14 -14
- data/test/test_reliability_icc.rb +7 -7
- data/test/test_reliability_skillscale.rb +6 -6
- data/test/test_resample.rb +1 -1
- data/test/test_rserve_extension.rb +4 -4
- data/test/test_statistics.rb +5 -5
- data/test/test_stest.rb +8 -8
- data/test/test_stratified.rb +3 -3
- data/test/test_test_t.rb +5 -5
- data/test/test_umannwhitney.rb +2 -2
- data/test/test_vector.rb +153 -119
- data/test/test_wilcoxonsignedrank.rb +4 -4
- data/test/test_xls.rb +6 -6
- 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].
|
9
|
-
@v2 = [125, 115, 130, 140, 140, 115, 140, 125, 140, 135].
|
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].
|
38
|
-
@v1 = [78, 24, 62, 48, 68, 56, 25, 44, 56, 40, 68, 36, 68, 20, 58, 32].
|
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
|
data/test/test_xls.rb
CHANGED
@@ -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(:
|
15
|
-
name = %w(Alex Claude Peter Franz George Fernand).to_vector(:
|
16
|
-
age = [20, 23, 25, nil, 5.5, nil].to_vector(:
|
17
|
-
city = ['New York', 'London', 'London', 'Paris', 'Tome', nil].to_vector(:
|
18
|
-
a1 = ['a,b', 'b,c', 'a', nil, 'a,b,c', nil].to_vector(:
|
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) }.
|
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
|
+
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-
|
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: []
|