statsample 1.0.1 → 1.1.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.
Files changed (39) hide show
  1. data/.gemtest +0 -0
  2. data/History.txt +14 -0
  3. data/Manifest.txt +4 -0
  4. data/README.txt +49 -13
  5. data/data/locale/es/LC_MESSAGES/statsample.mo +0 -0
  6. data/lib/statsample.rb +1 -23
  7. data/lib/statsample/analysis.rb +49 -28
  8. data/lib/statsample/analysis/suite.rb +18 -5
  9. data/lib/statsample/analysis/suitereportbuilder.rb +9 -3
  10. data/lib/statsample/anova.rb +2 -0
  11. data/lib/statsample/anova/contrast.rb +79 -0
  12. data/lib/statsample/anova/oneway.rb +39 -5
  13. data/lib/statsample/converter/csv.rb +2 -5
  14. data/lib/statsample/converters.rb +1 -0
  15. data/lib/statsample/dataset.rb +31 -1
  16. data/lib/statsample/graph/histogram.rb +1 -1
  17. data/lib/statsample/regression/multiple/baseengine.rb +5 -0
  18. data/lib/statsample/reliability/multiscaleanalysis.rb +3 -1
  19. data/lib/statsample/reliability/scaleanalysis.rb +3 -4
  20. data/lib/statsample/shorthand.rb +41 -1
  21. data/lib/statsample/test.rb +10 -0
  22. data/lib/statsample/test/kolmogorovsmirnov.rb +61 -0
  23. data/lib/statsample/test/t.rb +92 -9
  24. data/lib/statsample/vector.rb +143 -10
  25. data/po/es/statsample.mo +0 -0
  26. data/po/es/statsample.po +109 -110
  27. data/po/statsample.pot +108 -60
  28. data/test/helpers_tests.rb +1 -0
  29. data/test/test_analysis.rb +70 -11
  30. data/test/test_anova_contrast.rb +36 -0
  31. data/test/test_anovawithvectors.rb +8 -0
  32. data/test/test_dataset.rb +12 -0
  33. data/test/test_factor_pa.rb +1 -3
  34. data/test/test_test_kolmogorovsmirnov.rb +34 -0
  35. data/test/test_test_t.rb +16 -0
  36. data/test/test_vector.rb +40 -2
  37. metadata +44 -118
  38. data.tar.gz.sig +0 -0
  39. metadata.gz.sig +0 -0
@@ -0,0 +1,36 @@
1
+ require(File.expand_path(File.dirname(__FILE__)+'/helpers_tests.rb'))
2
+ class StatsampleAnovaContrastTestCase < MiniTest::Unit::TestCase
3
+ context(Statsample::Anova::Contrast) do
4
+ setup do
5
+ constant=[12,13,11,12,12].to_scale
6
+ frequent=[9,10,9,13,14].to_scale
7
+ infrequent=[15,16,17,16,16].to_scale
8
+ never=[17,18,12,18,20].to_scale
9
+ @vectors=[constant, frequent, infrequent, never]
10
+ @c=Statsample::Anova::Contrast.new(:vectors=>@vectors)
11
+ end
12
+ should "return correct value using c" do
13
+ @c.c([1,-1.quo(3),-1.quo(3),-1.quo(3)])
14
+ #@c.c([1,-0.333,-0.333,-0.333])
15
+ assert_in_delta(-2.6667, @c.psi, 0.0001)
16
+ assert_in_delta(1.0165, @c.se, 0.0001)
17
+ assert_in_delta(-2.623, @c.t, 0.001)
18
+ assert_in_delta(-4.82, @c.confidence_interval[0],0.01)
19
+ assert_in_delta(-0.51, @c.confidence_interval[1],0.01)
20
+ assert(@c.summary.size>0)
21
+ end
22
+ should "return correct values using c_by_index" do
23
+ @c.c_by_index([0],[1,2,3])
24
+ assert_in_delta(-2.6667, @c.psi, 0.0001)
25
+ assert_in_delta(1.0165, @c.se, 0.0001)
26
+ assert_in_delta(-2.623, @c.t, 0.001)
27
+ end
28
+ should "return correct values using incomplete c_by_index" do
29
+ c1=Statsample::Anova::Contrast.new(:vectors=>@vectors, :c=>[0.5,0.5,-1,0])
30
+ c2=Statsample::Anova::Contrast.new(:vectors=>@vectors, :c1=>[0,1],:c2=>[2])
31
+ assert_equal(c1.psi,c2.psi)
32
+ assert_equal(c1.se,c2.se)
33
+ assert_equal(c1.t,c2.t)
34
+ end
35
+ end
36
+ end
@@ -1,6 +1,7 @@
1
1
  require(File.expand_path(File.dirname(__FILE__)+'/helpers_tests.rb'))
2
2
  class StatsampleAnovaOneWayWithVectorsTestCase < MiniTest::Unit::TestCase
3
3
  context(Statsample::Anova::OneWayWithVectors) do
4
+
4
5
  context("when initializing") do
5
6
  setup do
6
7
  @v1=10.times.map {rand(100)}.to_scale
@@ -34,6 +35,13 @@ class StatsampleAnovaOneWayWithVectorsTestCase < MiniTest::Unit::TestCase
34
35
  @name="Anova testing"
35
36
  @anova=Statsample::Anova::OneWayWithVectors.new(@v1,@v2,@v3, :name=>@name)
36
37
  end
38
+ should "store correctly contrasts" do
39
+ c1=Statsample::Anova::Contrast.new(:vectors=>[@v1,@v2,@v3], :c=>[1,-0.5, -0.5])
40
+
41
+ c2=@anova.contrast(:c=>[1,-0.5,-0.5])
42
+ assert_equal(c1.t,c2.t)
43
+
44
+ end
37
45
  should "respond to #summary" do
38
46
  assert(@anova.respond_to? :summary)
39
47
  end
data/test/test_dataset.rb CHANGED
@@ -5,6 +5,18 @@ class StatsampleDatasetTestCase < MiniTest::Unit::TestCase
5
5
  'city'=>Statsample::Vector.new(['New York','London','London','Paris','Tome']),
6
6
  'a1'=>Statsample::Vector.new(['a,b','b,c','a',nil,'a,b,c'])}, ['id','name','age','city','a1'])
7
7
  end
8
+ def test_nest
9
+ ds={
10
+ 'a'=>%w{a a a b b b}.to_vector,
11
+ 'b'=>%w{c c d d e e}.to_vector,
12
+ 'c'=>%w{f g h i j k}.to_vector
13
+ }.to_dataset
14
+ nest=ds.nest('a','b')
15
+ assert_equal([{'c'=>'f'},{'c'=>'g'}], nest['a']['c'])
16
+ assert_equal([{'c'=>'h'}], nest['a']['d'])
17
+ assert_equal([{'c'=>'j'},{'c'=>'k'}], nest['b']['e'])
18
+
19
+ end
8
20
  def test_should_have_summary
9
21
  assert(@ds.summary.size>0)
10
22
  end
@@ -35,7 +35,7 @@ class StatsampleFactorTestCase < MiniTest::Unit::TestCase
35
35
  pa2=Statsample::Factor::ParallelAnalysis.with_random_data(samples,variables,:iterations=>iterations,:percentil=>95)
36
36
  3.times do |n|
37
37
  var="ev_0000#{n+1}"
38
- assert_in_delta(pa1.ds_eigenvalues[var].mean, pa2.ds_eigenvalues[var].mean,0.04)
38
+ assert_in_delta(pa1.ds_eigenvalues[var].mean, pa2.ds_eigenvalues[var].mean,0.05)
39
39
  end
40
40
  else
41
41
  skip("Too slow without GSL")
@@ -48,7 +48,5 @@ class StatsampleFactorTestCase < MiniTest::Unit::TestCase
48
48
  assert_in_delta(1.1542, pa.ds_eigenvalues['ev_00002'].mean, 0.01)
49
49
  assert_in_delta(1.0836, pa.ds_eigenvalues['ev_00003'].mean, 0.01)
50
50
  assert(pa.summary.size>0)
51
- #pa=Statsample::Factor::ParallelAnalysis.with_random_data(305,8,100, 95, true)
52
- #puts pa.summary
53
51
  end
54
52
  end
@@ -0,0 +1,34 @@
1
+ require(File.expand_path(File.dirname(__FILE__)+'/helpers_tests.rb'))
2
+ class StatsampleTestKolmogorovSmirnovTestCase < MiniTest::Unit::TestCase
3
+ context(Statsample::Test::KolmogorovSmirnov) do
4
+ should "calculate correctly D for two given samples" do
5
+ a=[1.1,2.5,5.6,9]
6
+ b=[1,2.3,5.8,10]
7
+ ks=Statsample::Test::KolmogorovSmirnov.new(a,b)
8
+ assert_equal(0.25,ks.d)
9
+ end
10
+ should "calculate correctly D for a normal sample and Normal Distribution" do
11
+ a=[0.30022510,-0.36664035,0.08593404,1.29881130,-0.49878633,-0.63056010, 0.28397638, -0.04913700,0.03566644,-1.33414346]
12
+ ks=Statsample::Test::KolmogorovSmirnov.new(a,Distribution::Normal)
13
+ assert_in_delta(0.282, ks.d,0.001)
14
+ end
15
+ should "calculate correctly D for a variable normal and Normal Distribution" do
16
+ rng=Distribution::Normal.rng
17
+ a=100.times.map {rng.call}
18
+ ks=Statsample::Test::KolmogorovSmirnov.new(a,Distribution::Normal)
19
+ assert(ks.d<0.15)
20
+ end
21
+
22
+ context(Statsample::Test::KolmogorovSmirnov::EmpiricDistribution) do
23
+ should "Create a correct empirical distribution for an array" do
24
+ a=[10,9,8,7,6,5,4,3,2,1]
25
+ ed=Statsample::Test::KolmogorovSmirnov::EmpiricDistribution.new(a)
26
+ assert_equal(0, ed.cdf(-2))
27
+ assert_equal(0.5, ed.cdf(5))
28
+ assert_equal(0.5, ed.cdf(5.5))
29
+ assert_equal(0.9, ed.cdf(9))
30
+ assert_equal(1, ed.cdf(11))
31
+ end
32
+ end
33
+ end
34
+ end
data/test/test_test_t.rb CHANGED
@@ -13,6 +13,22 @@ class StatsampleTestTTestCase < MiniTest::Unit::TestCase
13
13
  @n1=@a.n
14
14
  @n2=@b.n
15
15
  end
16
+ should "calculate correctly standard t" do
17
+ t=Statsample::Test::T.new(@x1, @s1.quo(Math.sqrt(@a.n)), @a.n-1)
18
+ assert_equal((@x1).quo(@s1.quo(Math.sqrt(@a.n))), t.t)
19
+ assert_equal(@a.n-1, t.df)
20
+ assert(t.summary.size>0)
21
+ end
22
+ should "calculate correctly t for one sample" do
23
+ t1=[6, 4, 6, 7, 4,5,5,12,6,1].to_scale
24
+ t2=[9, 6, 5,10,10,8,7,10,6,5].to_scale
25
+ d=t1-t2
26
+ t=Statsample::Test::T::OneSample.new(d)
27
+ assert_in_delta(-2.631, t.t, 0.001)
28
+ assert_in_delta( 0.027, t.probability, 0.001)
29
+ assert_in_delta( 0.76012, t.se, 0.0001)
30
+ assert(t.summary.size>0)
31
+ end
16
32
  should "calculate correctly t for two samples" do
17
33
  assert_in_delta(1.959, T.two_sample_independent(@x1, @x2, @s1, @s2, @n1, @n2),0.001)
18
34
  assert_in_delta(1.959, T.two_sample_independent(@x1, @x2, @s1, @s2, @n1, @n2,true),0.001)
data/test/test_vector.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require(File.expand_path(File.dirname(__FILE__)+'/helpers_tests.rb'))
2
2
 
3
3
  class StatsampleTestVector < MiniTest::Unit::TestCase
4
+ include Statsample::Shorthand
5
+
4
6
  def setup
5
7
  @c = Statsample::Vector.new([5,5,5,5,5,6,6,7,8,9,10,1,2,3,4,nil,-99,-99], :nominal)
6
8
  @c.name="Test Vector"
@@ -66,7 +68,7 @@ class StatsampleTestVector < MiniTest::Unit::TestCase
66
68
  refute(v.flawed?)
67
69
 
68
70
  end
69
-
71
+
70
72
  context "using matrix operations" do
71
73
  setup do
72
74
  @a=[1,2,3,4,5].to_scale
@@ -164,7 +166,10 @@ class StatsampleTestVector < MiniTest::Unit::TestCase
164
166
  assert_counting_tokens(b)
165
167
  end
166
168
  end
167
-
169
+ should "return correct median_absolute_deviation" do
170
+ a=[1, 1, 2, 2, 4, 6, 9].to_scale
171
+ assert_equal(1, a.median_absolute_deviation)
172
+ end
168
173
  should "return correct histogram" do
169
174
  a=10.times.map {|v| v}.to_scale
170
175
  hist=a.histogram(2)
@@ -287,6 +292,39 @@ class StatsampleTestVector < MiniTest::Unit::TestCase
287
292
  @c.type=:ordinal
288
293
  assert_raise(::NoMethodError) { @c.mean }
289
294
  end
295
+ should "jacknife correctly with named method" do
296
+ # First example
297
+ a=[1,2,3,4].to_scale
298
+ ds=a.jacknife(:mean)
299
+ assert_equal(a.mean, ds[:mean].mean)
300
+ ds=a.jacknife([:mean,:sd])
301
+ assert_equal(a.mean, ds[:mean].mean)
302
+ assert_equal(a.sd, ds[:mean].sd)
303
+ end
304
+ should "jacknife correctly with custom method" do
305
+ # Second example
306
+ a=[17.23, 18.71,13.93,18.81,15.78,11.29,14.91,13.39, 18.21, 11.57, 14.28, 10.94, 18.83, 15.52,13.45,15.25].to_scale
307
+ ds=a.jacknife(:log_s2=>lambda {|v| Math.log(v.variance) })
308
+ exp=[1.605, 2.972, 1.151, 3.097, 0.998, 3.308, 0.942, 1.393, 2.416, 2.951, 1.043, 3.806, 3.122, 0.958, 1.362, 0.937].to_scale
309
+
310
+ assert_similar_vector(exp, ds[:log_s2], 0.001)
311
+ assert_in_delta(2.00389, ds[:log_s2].mean, 0.00001)
312
+ assert_in_delta(1.091, ds[:log_s2].variance, 0.001)
313
+ end
314
+ should "jacknife correctly with k>1" do
315
+ a=rnorm(6)
316
+ ds=a.jacknife(:mean,2)
317
+ mean=a.mean
318
+ exp=[3*mean-2*(a[2]+a[3]+a[4]+a[5]) / 4, 3*mean-2*(a[0]+a[1]+a[4]+a[5]) / 4, 3*mean-2*(a[0]+a[1]+a[2]+a[3]) / 4].to_scale
319
+ assert_similar_vector(exp, ds[:mean], 1e-13)
320
+ end
321
+ should "bootstrap should return a vector with mean=mu and sd=se" do
322
+ a=rnorm(100)
323
+ ds=a.bootstrap([:mean,:sd],200)
324
+ se=1/Math.sqrt(a.size)
325
+ assert_in_delta(0, ds[:mean].mean, 0.3)
326
+ assert_in_delta(se, ds[:mean].sd, 0.02)
327
+ end
290
328
 
291
329
 
292
330
  end
metadata CHANGED
@@ -1,41 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsample
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 1
9
- version: 1.0.1
4
+ prerelease:
5
+ version: 1.1.0
10
6
  platform: ruby
11
7
  authors:
12
8
  - Claudio Bustos
13
9
  autorequire:
14
10
  bindir: bin
15
- cert_chain:
16
- - |
17
- -----BEGIN CERTIFICATE-----
18
- MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhjbGJ1
19
- c3RvczEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
20
- MB4XDTEwMDMyOTIxMzg1NVoXDTExMDMyOTIxMzg1NVowPzERMA8GA1UEAwwIY2xi
21
- dXN0b3MxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
22
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf8JVMGqE7m5kYb+PNN
23
- neZv2pcXV5fQCi6xkyG8bi2/SIFy/LyxuvLzEeOxBeaz1Be93bayIUquOIqw3dyw
24
- /KXWa31FxuNuvAm6CN8fyeRYX/ou4cw3OIUUnIvB7RMNIu4wbgeM6htV/QEsNLrv
25
- at1/mh9JpqawPrcjIOVMj4BIp67vmzJCaUf+S/H2uYtSO09F+YQE3tv85TPeRmqU
26
- yjyXyTc/oJiw1cXskUL8UtMWZmrwNLHXuZWWIMzkjiz3UNdhJr/t5ROk8S2WPznl
27
- 0bMy/PMIlAbqWolRn1zl2VFJ3TaXScbqImY8Wf4g62b/1ZSUlGrtnLNsCYXrWiso
28
- UPUCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFGu9
29
- rrJ1H64qRmNNu3Jj/Qjvh0u5MA0GCSqGSIb3DQEBBQUAA4IBAQCV0Unka5isrhZk
30
- GjqSDqY/6hF+G2pbFcbWUpjmC8NWtAxeC+7NGV3ljd0e1SLfoyBj4gnFtFmY8qX4
31
- K02tgSZM0eDV8TpgFpWXzK6LzHvoanuahHLZEtk/+Z885lFene+nHadkem1n9iAB
32
- cs96JO9/JfFyuXM27wFAwmfHCmJfPF09R4VvGHRAvb8MGzSVgk2i06OJTqkBTwvv
33
- JHJdoyw3+8bw9RJ+jLaNoQ+xu+1pQdS2bb3m7xjZpufml/m8zFCtjYM/7qgkKR8z
34
- /ZZt8lCiKfFArppRrZayE2FVsps4X6WwBdrKTMZ0CKSXTRctbEj1BAZ67eoTvBBt
35
- rpP0jjs0
36
- -----END CERTIFICATE-----
11
+ cert_chain: []
37
12
 
38
- date: 2011-01-28 00:00:00 -03:00
13
+ date: 2011-06-02 00:00:00 -04:00
39
14
  default_executable:
40
15
  dependencies:
41
16
  - !ruby/object:Gem::Dependency
@@ -46,10 +21,6 @@ dependencies:
46
21
  requirements:
47
22
  - - ~>
48
23
  - !ruby/object:Gem::Version
49
- segments:
50
- - 0
51
- - 6
52
- - 5
53
24
  version: 0.6.5
54
25
  type: :runtime
55
26
  version_requirements: *id001
@@ -61,9 +32,6 @@ dependencies:
61
32
  requirements:
62
33
  - - ~>
63
34
  - !ruby/object:Gem::Version
64
- segments:
65
- - 1
66
- - 4
67
35
  version: "1.4"
68
36
  type: :runtime
69
37
  version_requirements: *id002
@@ -75,10 +43,6 @@ dependencies:
75
43
  requirements:
76
44
  - - ~>
77
45
  - !ruby/object:Gem::Version
78
- segments:
79
- - 0
80
- - 2
81
- - 0
82
46
  version: 0.2.0
83
47
  type: :runtime
84
48
  version_requirements: *id003
@@ -90,8 +54,6 @@ dependencies:
90
54
  requirements:
91
55
  - - ">"
92
56
  - !ruby/object:Gem::Version
93
- segments:
94
- - 0
95
57
  version: "0"
96
58
  type: :runtime
97
59
  version_requirements: *id004
@@ -103,9 +65,6 @@ dependencies:
103
65
  requirements:
104
66
  - - ~>
105
67
  - !ruby/object:Gem::Version
106
- segments:
107
- - 0
108
- - 0
109
68
  version: "0.0"
110
69
  type: :runtime
111
70
  version_requirements: *id005
@@ -117,10 +76,6 @@ dependencies:
117
76
  requirements:
118
77
  - - ~>
119
78
  - !ruby/object:Gem::Version
120
- segments:
121
- - 0
122
- - 3
123
- - 1
124
79
  version: 0.3.1
125
80
  type: :runtime
126
81
  version_requirements: *id006
@@ -132,8 +87,6 @@ dependencies:
132
87
  requirements:
133
88
  - - ">"
134
89
  - !ruby/object:Gem::Version
135
- segments:
136
- - 0
137
90
  version: "0"
138
91
  type: :runtime
139
92
  version_requirements: *id007
@@ -145,10 +98,6 @@ dependencies:
145
98
  requirements:
146
99
  - - ~>
147
100
  - !ruby/object:Gem::Version
148
- segments:
149
- - 0
150
- - 2
151
- - 5
152
101
  version: 0.2.5
153
102
  type: :runtime
154
103
  version_requirements: *id008
@@ -160,10 +109,6 @@ dependencies:
160
109
  requirements:
161
110
  - - ~>
162
111
  - !ruby/object:Gem::Version
163
- segments:
164
- - 0
165
- - 4
166
- - 0
167
112
  version: 0.4.0
168
113
  type: :runtime
169
114
  version_requirements: *id009
@@ -175,9 +120,6 @@ dependencies:
175
120
  requirements:
176
121
  - - ~>
177
122
  - !ruby/object:Gem::Version
178
- segments:
179
- - 0
180
- - 3
181
123
  version: "0.3"
182
124
  type: :runtime
183
125
  version_requirements: *id010
@@ -189,8 +131,6 @@ dependencies:
189
131
  requirements:
190
132
  - - ~>
191
133
  - !ruby/object:Gem::Version
192
- segments:
193
- - 0
194
134
  version: "0"
195
135
  type: :development
196
136
  version_requirements: *id011
@@ -202,8 +142,6 @@ dependencies:
202
142
  requirements:
203
143
  - - ~>
204
144
  - !ruby/object:Gem::Version
205
- segments:
206
- - 0
207
145
  version: "0"
208
146
  type: :development
209
147
  version_requirements: *id012
@@ -215,9 +153,6 @@ dependencies:
215
153
  requirements:
216
154
  - - ~>
217
155
  - !ruby/object:Gem::Version
218
- segments:
219
- - 2
220
- - 0
221
156
  version: "2.0"
222
157
  type: :development
223
158
  version_requirements: *id013
@@ -229,8 +164,6 @@ dependencies:
229
164
  requirements:
230
165
  - - ~>
231
166
  - !ruby/object:Gem::Version
232
- segments:
233
- - 0
234
167
  version: "0"
235
168
  type: :development
236
169
  version_requirements: *id014
@@ -242,8 +175,6 @@ dependencies:
242
175
  requirements:
243
176
  - - ~>
244
177
  - !ruby/object:Gem::Version
245
- segments:
246
- - 0
247
178
  version: "0"
248
179
  type: :development
249
180
  version_requirements: *id015
@@ -255,8 +186,6 @@ dependencies:
255
186
  requirements:
256
187
  - - ~>
257
188
  - !ruby/object:Gem::Version
258
- segments:
259
- - 0
260
189
  version: "0"
261
190
  type: :development
262
191
  version_requirements: *id016
@@ -268,8 +197,6 @@ dependencies:
268
197
  requirements:
269
198
  - - ~>
270
199
  - !ruby/object:Gem::Version
271
- segments:
272
- - 0
273
200
  version: "0"
274
201
  type: :development
275
202
  version_requirements: *id017
@@ -281,22 +208,18 @@ dependencies:
281
208
  requirements:
282
209
  - - ">="
283
210
  - !ruby/object:Gem::Version
284
- segments:
285
- - 2
286
- - 8
287
- - 0
288
- version: 2.8.0
211
+ version: 2.9.0
289
212
  type: :development
290
213
  version_requirements: *id018
291
214
  description: |-
292
- A suite for basic and advanced statistics on Ruby. Tested on Ruby 1.8.7, 1.9.1, 1.9.2 (April, 2010) and JRuby 1.4 (Ruby 1.8.7 compatible).
215
+ A suite for basic and advanced statistics on Ruby. Tested on Ruby 1.8.7, 1.9.1, 1.9.2 (April, 2010), ruby-head(June, 2011) and JRuby 1.4 (Ruby 1.8.7 compatible).
293
216
 
294
217
  Include:
295
218
  * Descriptive statistics: frequencies, median, mean, standard error, skew, kurtosis (and many others).
296
219
  * Imports and exports datasets from and to Excel, CSV and plain text files.
297
220
  * Correlations: Pearson's r, Spearman's rank correlation (rho), point biserial, tau a, tau b and gamma. Tetrachoric and Polychoric correlation provides by +statsample-bivariate-extension+ gem.
298
221
  * Intra-class correlation
299
- * Anova: generic and vector-based One-way ANOVA and Two-way ANOVA
222
+ * Anova: generic and vector-based One-way ANOVA and Two-way ANOVA, with contrasts for One-way ANOVA.
300
223
  * Tests: F, T, Levene, U-Mannwhitney.
301
224
  * Regression: Simple, Multiple (OLS), Probit and Logit
302
225
  * Factorial Analysis: Extraction (PCA and Principal Axis), Rotation (Varimax, Equimax, Quartimax) and Parallel Analysis and Velicer's MAP test, for estimation of number of factors.
@@ -365,6 +288,7 @@ files:
365
288
  - lib/statsample/analysis/suite.rb
366
289
  - lib/statsample/analysis/suitereportbuilder.rb
367
290
  - lib/statsample/anova.rb
291
+ - lib/statsample/anova/contrast.rb
368
292
  - lib/statsample/anova/oneway.rb
369
293
  - lib/statsample/anova/twoway.rb
370
294
  - lib/statsample/bivariate.rb
@@ -418,6 +342,7 @@ files:
418
342
  - lib/statsample/test/bartlettsphericity.rb
419
343
  - lib/statsample/test/chisquare.rb
420
344
  - lib/statsample/test/f.rb
345
+ - lib/statsample/test/kolmogorovsmirnov.rb
421
346
  - lib/statsample/test/levene.rb
422
347
  - lib/statsample/test/t.rb
423
348
  - lib/statsample/test/umannwhitney.rb
@@ -440,6 +365,7 @@ files:
440
365
  - test/fixtures/tetmat_test.txt
441
366
  - test/helpers_tests.rb
442
367
  - test/test_analysis.rb
368
+ - test/test_anova_contrast.rb
443
369
  - test/test_anovaoneway.rb
444
370
  - test/test_anovatwoway.rb
445
371
  - test/test_anovatwowaywithdataset.rb
@@ -472,11 +398,13 @@ files:
472
398
  - test/test_stest.rb
473
399
  - test/test_stratified.rb
474
400
  - test/test_test_f.rb
401
+ - test/test_test_kolmogorovsmirnov.rb
475
402
  - test/test_test_t.rb
476
403
  - test/test_umannwhitney.rb
477
404
  - test/test_vector.rb
478
405
  - test/test_xls.rb
479
406
  - web/Rakefile
407
+ - .gemtest
480
408
  has_rdoc: true
481
409
  homepage: http://ruby-statsample.rubyforge.org/
482
410
  licenses: []
@@ -510,59 +438,57 @@ required_ruby_version: !ruby/object:Gem::Requirement
510
438
  requirements:
511
439
  - - ">="
512
440
  - !ruby/object:Gem::Version
513
- segments:
514
- - 0
515
441
  version: "0"
516
442
  required_rubygems_version: !ruby/object:Gem::Requirement
517
443
  none: false
518
444
  requirements:
519
445
  - - ">="
520
446
  - !ruby/object:Gem::Version
521
- segments:
522
- - 0
523
447
  version: "0"
524
448
  requirements: []
525
449
 
526
450
  rubyforge_project: ruby-statsample
527
- rubygems_version: 1.3.7
451
+ rubygems_version: 1.5.0
528
452
  signing_key:
529
453
  specification_version: 3
530
454
  summary: A suite for basic and advanced statistics on Ruby
531
455
  test_files:
532
- - test/test_bivariate.rb
533
- - test/test_factor_pa.rb
534
- - test/test_dominance_analysis.rb
535
- - test/test_factor.rb
536
- - test/test_codification.rb
537
- - test/test_anovatwowaywithdataset.rb
538
- - test/test_umannwhitney.rb
456
+ - test/test_analysis.rb
457
+ - test/test_regression.rb
458
+ - test/test_stest.rb
459
+ - test/test_logit.rb
460
+ - test/test_ggobi.rb
539
461
  - test/test_factor_map.rb
540
- - test/test_anovawithvectors.rb
541
- - test/test_crosstab.rb
542
- - test/test_rserve_extension.rb
462
+ - test/test_anovatwoway.rb
463
+ - test/test_test_f.rb
464
+ - test/test_multiset.rb
465
+ - test/test_srs.rb
466
+ - test/test_codification.rb
543
467
  - test/test_csv.rb
544
- - test/test_analysis.rb
545
- - test/test_matrix.rb
468
+ - test/test_crosstab.rb
469
+ - test/test_umannwhitney.rb
546
470
  - test/test_gsl.rb
471
+ - test/test_anova_contrast.rb
472
+ - test/test_test_kolmogorovsmirnov.rb
547
473
  - test/test_bartlettsphericity.rb
548
- - test/test_mle.rb
549
- - test/test_resample.rb
550
- - test/test_stratified.rb
551
474
  - test/test_vector.rb
552
- - test/test_srs.rb
553
- - test/test_ggobi.rb
554
- - test/test_xls.rb
555
- - test/test_logit.rb
556
- - test/test_stest.rb
557
- - test/test_statistics.rb
558
- - test/test_reliability.rb
559
- - test/test_reliability_icc.rb
560
- - test/test_anovatwoway.rb
561
- - test/test_test_f.rb
562
475
  - test/test_test_t.rb
563
- - test/test_histogram.rb
476
+ - test/test_reliability.rb
477
+ - test/test_bivariate.rb
478
+ - test/test_anovawithvectors.rb
479
+ - test/test_xls.rb
480
+ - test/test_anovaoneway.rb
564
481
  - test/test_dataset.rb
565
- - test/test_regression.rb
566
- - test/test_multiset.rb
482
+ - test/test_rserve_extension.rb
567
483
  - test/test_reliability_skillscale.rb
568
- - test/test_anovaoneway.rb
484
+ - test/test_histogram.rb
485
+ - test/test_stratified.rb
486
+ - test/test_matrix.rb
487
+ - test/test_dominance_analysis.rb
488
+ - test/test_anovatwowaywithdataset.rb
489
+ - test/test_resample.rb
490
+ - test/test_mle.rb
491
+ - test/test_statistics.rb
492
+ - test/test_factor.rb
493
+ - test/test_factor_pa.rb
494
+ - test/test_reliability_icc.rb