statsample 0.9.0 → 0.10.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.
- data.tar.gz.sig +0 -0
- data/History.txt +20 -1
- data/Manifest.txt +8 -1
- data/README.txt +11 -7
- data/Rakefile +2 -2
- data/data/locale/es/LC_MESSAGES/statsample.mo +0 -0
- data/examples/dataset.rb +8 -0
- data/examples/multiple_regression.rb +1 -1
- data/examples/parallel_analysis.rb +29 -0
- data/examples/parallel_analysis_tetrachoric.rb +30 -0
- data/examples/vector.rb +6 -0
- data/lib/distribution.rb +16 -6
- data/lib/distribution/normal.rb +27 -20
- data/lib/distribution/normalbivariate.rb +1 -1
- data/lib/statsample.rb +19 -2
- data/lib/statsample/anova.rb +118 -16
- data/lib/statsample/bivariate.rb +27 -13
- data/lib/statsample/bivariate/polychoric.rb +18 -5
- data/lib/statsample/crosstab.rb +66 -74
- data/lib/statsample/dataset.rb +52 -45
- data/lib/statsample/dominanceanalysis.rb +2 -5
- data/lib/statsample/factor.rb +1 -1
- data/lib/statsample/factor/parallelanalysis.rb +122 -0
- data/lib/statsample/factor/pca.rb +23 -28
- data/lib/statsample/factor/principalaxis.rb +8 -3
- data/lib/statsample/matrix.rb +27 -24
- data/lib/statsample/mle.rb +11 -11
- data/lib/statsample/permutation.rb +2 -1
- data/lib/statsample/regression.rb +10 -8
- data/lib/statsample/regression/multiple/baseengine.rb +36 -25
- data/lib/statsample/regression/multiple/gslengine.rb +14 -0
- data/lib/statsample/regression/multiple/matrixengine.rb +4 -32
- data/lib/statsample/regression/multiple/rubyengine.rb +2 -6
- data/lib/statsample/regression/simple.rb +1 -1
- data/lib/statsample/reliability.rb +42 -54
- data/lib/statsample/test.rb +10 -6
- data/lib/statsample/test/f.rb +16 -26
- data/lib/statsample/test/levene.rb +4 -8
- data/lib/statsample/test/t.rb +30 -24
- data/lib/statsample/test/umannwhitney.rb +13 -6
- data/lib/statsample/vector.rb +86 -76
- data/po/es/statsample.mo +0 -0
- data/po/es/statsample.po +127 -94
- data/po/statsample.pot +114 -79
- data/test/test_anovaoneway.rb +27 -0
- data/test/test_anovawithvectors.rb +97 -0
- data/test/test_bivariate.rb +6 -57
- data/test/test_bivariate_polychoric.rb +65 -0
- data/test/test_crosstab.rb +6 -0
- data/test/test_dataset.rb +29 -1
- data/test/test_distribution.rb +6 -13
- data/test/test_dominance_analysis.rb +1 -1
- data/test/test_factor.rb +3 -3
- data/test/test_helpers.rb +18 -18
- data/test/test_matrix.rb +33 -20
- data/test/test_permutation.rb +36 -30
- data/test/test_regression.rb +26 -8
- data/test/test_reliability.rb +104 -14
- data/test/test_test_f.rb +11 -14
- data/test/test_test_t.rb +42 -35
- data/test/test_umannwhitney.rb +22 -10
- data/test/test_vector.rb +204 -102
- metadata +57 -81
- metadata.gz.sig +0 -0
- data/test/test_anova.rb +0 -24
data/test/test_umannwhitney.rb
CHANGED
@@ -2,15 +2,27 @@ require(File.dirname(__FILE__)+'/test_helpers.rb')
|
|
2
2
|
|
3
3
|
|
4
4
|
class StatsampleUMannWhitneyTestCase < MiniTest::Unit::TestCase
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
include Statsample::Test
|
6
|
+
context Statsample::Test::UMannWhitney do
|
7
|
+
setup do
|
8
|
+
@v1=[1,2,3,4,7,8,9,10,14,15].to_scale
|
9
|
+
@v2=[5,6,11,12,13,16,17,18,19].to_scale
|
10
|
+
@u=Statsample::Test::UMannWhitney.new(@v1,@v2)
|
11
|
+
end
|
12
|
+
should "have same result using class or Test#u_mannwhitney" do
|
13
|
+
assert_equal(Statsample::Test.u_mannwhitney(@v1,@v2).u, @u.u)
|
14
|
+
end
|
15
|
+
should "have correct U values" do
|
16
|
+
assert_equal(73,@u.r1)
|
17
|
+
assert_equal(117,@u.r2)
|
18
|
+
assert_equal(18,@u.u)
|
19
|
+
end
|
20
|
+
should "have correct value for z" do
|
21
|
+
assert_in_delta(-2.205,@u.z,0.001)
|
22
|
+
end
|
23
|
+
should "have correct value for z and exact probability" do
|
24
|
+
assert_in_delta(0.027,@u.probability_z,0.001)
|
25
|
+
assert_in_delta(0.028,@u.probability_exact,0.001)
|
26
|
+
end
|
15
27
|
end
|
16
28
|
end
|
data/test/test_vector.rb
CHANGED
@@ -1,113 +1,222 @@
|
|
1
1
|
require(File.dirname(__FILE__)+'/test_helpers.rb')
|
2
2
|
|
3
3
|
class StatsampleTestVector < MiniTest::Unit::TestCase
|
4
|
-
|
5
4
|
def setup
|
6
5
|
@c = Statsample::Vector.new([5,5,5,5,5,6,6,7,8,9,10,1,2,3,4,nil,-99,-99], :nominal)
|
6
|
+
@c.name="Test Vector"
|
7
7
|
@c.missing_values=[-99]
|
8
|
-
|
9
|
-
end
|
10
|
-
def test_save_load
|
11
|
-
outfile=Tempfile.new("vector.vec")
|
12
|
-
@c.save(outfile.path)
|
13
|
-
a=Statsample.load(outfile.path)
|
14
|
-
assert_equal(@c,a)
|
15
|
-
|
16
|
-
end
|
17
|
-
def test_lazy_methods
|
18
|
-
data=[1,2,3,4,5,nil]
|
19
|
-
correct=Statsample::Vector.new(data,:scale)
|
20
|
-
lazy1=data.to_vector(:scale)
|
21
|
-
lazy2=data.to_scale
|
22
|
-
assert_equal(correct,lazy1)
|
23
|
-
assert_equal(correct,lazy2)
|
24
|
-
assert_equal(:scale,lazy2.type)
|
25
|
-
assert_equal([1,2,3,4,5],lazy2.valid_data)
|
26
8
|
end
|
27
|
-
def
|
28
|
-
|
29
|
-
assert_equal(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
exp=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1].to_vector
|
34
|
-
assert_equal(exp,a)
|
35
|
-
exp.recode!{|v| v==0 ? 1:0}
|
36
|
-
exp2=(([1]*15)+([0]*3)).to_vector
|
37
|
-
assert_equal(exp2,exp)
|
38
|
-
end
|
39
|
-
def test_product
|
40
|
-
a=[1,2,3,4,5].to_vector(:scale)
|
41
|
-
assert_equal(120,a.product)
|
9
|
+
def assert_counting_tokens(b)
|
10
|
+
assert_equal([1,1,0,1,0,nil],b['a'].to_a)
|
11
|
+
assert_equal([0,1,0,0,0,nil],b['b'].to_a)
|
12
|
+
assert_equal([0,0,1,0,0,nil],b['c'].to_a)
|
13
|
+
assert_equal([0,0,1,1,0,nil],b['d'].to_a)
|
14
|
+
assert_equal([0,0,0,0,1,nil],b[10].to_a)
|
42
15
|
end
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
16
|
+
context Statsample do
|
17
|
+
setup do
|
18
|
+
@sample=100
|
19
|
+
@a=@sample.times.map{|i| (i+rand(10)) %10 ==0 ? nil : rand(100)}.to_scale
|
20
|
+
@b=@sample.times.map{|i| (i+rand(10)) %10 ==0 ? nil : rand(100)}.to_scale
|
21
|
+
@correct_a=Array.new
|
22
|
+
@correct_b=Array.new
|
23
|
+
@a.each_with_index do |v,i|
|
24
|
+
if !@a[i].nil? and !@b[i].nil?
|
25
|
+
@correct_a.push(@a[i])
|
26
|
+
@correct_b.push(@b[i])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
@correct_a=@correct_a.to_scale
|
30
|
+
@correct_b=@correct_b.to_scale
|
31
|
+
|
32
|
+
@common=lambda do |av,bv|
|
33
|
+
assert_equal(@correct_a,av)
|
34
|
+
assert_equal(@correct_b,bv)
|
35
|
+
assert(!av.has_missing_data?)
|
36
|
+
assert(!bv.has_missing_data?)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
should "return correct only_valid" do
|
40
|
+
av,bv=Statsample.only_valid @a,@b
|
41
|
+
av2,bv2=Statsample.only_valid av,bv
|
42
|
+
@common.call(av,bv)
|
43
|
+
assert_equal(av,av2)
|
44
|
+
assert_not_same(av,av2)
|
45
|
+
assert_not_same(bv,bv2)
|
46
|
+
end
|
47
|
+
should "return correct only_valid_clone" do
|
48
|
+
av,bv=Statsample.only_valid_clone @a,@b
|
49
|
+
@common.call(av,bv)
|
50
|
+
av2,bv2=Statsample.only_valid_clone av,bv
|
51
|
+
assert_equal(av,av2)
|
52
|
+
assert_same(av,av2)
|
53
|
+
assert_same(bv,bv2)
|
54
|
+
end
|
55
|
+
|
53
56
|
end
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
context Statsample::Vector do
|
58
|
+
setup do
|
59
|
+
@c = Statsample::Vector.new([5,5,5,5,5,6,6,7,8,9,10,1,2,3,4,nil,-99,-99], :nominal)
|
60
|
+
@c.name="Test Vector"
|
61
|
+
@c.missing_values=[-99]
|
62
|
+
end
|
63
|
+
context "using matrix operations" do
|
64
|
+
setup do
|
65
|
+
@a=[1,2,3,4,5].to_scale
|
66
|
+
end
|
67
|
+
should "to_matrix returns a matrix with 1 row" do
|
68
|
+
mh=Matrix[[1,2,3,4,5]]
|
69
|
+
assert_equal(mh,@a.to_matrix)
|
70
|
+
end
|
71
|
+
should "to_matrix(:vertical) returns a matrix with 1 column" do
|
72
|
+
mv=Matrix.columns([[1,2,3,4,5]])
|
73
|
+
assert_equal(mv,@a.to_matrix(:vertical))
|
74
|
+
end
|
75
|
+
should "returns valid submatrixes" do
|
76
|
+
# 3*4 + 2*5 = 22
|
77
|
+
a=[3,2].to_vector(:scale)
|
78
|
+
b=[4,5].to_vector(:scale)
|
79
|
+
assert_equal(22,(a.to_matrix*b.to_matrix(:vertical))[0,0])
|
80
|
+
end
|
81
|
+
end
|
82
|
+
context "when initializing" do
|
83
|
+
setup do
|
84
|
+
@data=(10.times.map{rand(100)})+[nil]
|
85
|
+
@original=Statsample::Vector.new(@data, :scale)
|
86
|
+
end
|
87
|
+
should "be the same usign #to_vector" do
|
88
|
+
lazy1=@data.to_vector(:scale)
|
89
|
+
assert_equal(@original,lazy1)
|
90
|
+
end
|
91
|
+
should "be the same using #to_scale" do
|
92
|
+
lazy2=@data.to_scale
|
93
|
+
assert_equal(@original,lazy2)
|
94
|
+
assert_equal(:scale,lazy2.type)
|
95
|
+
assert_equal(@data.find_all{|v| !v.nil?},lazy2.valid_data)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
context "#split_by_separator" do
|
100
|
+
|
101
|
+
setup do
|
102
|
+
@a = Statsample::Vector.new(["a","a,b","c,d","a,d",10,nil],:nominal)
|
103
|
+
@b=@a.split_by_separator(",")
|
104
|
+
end
|
105
|
+
should "returns a Hash" do
|
106
|
+
assert_kind_of(Hash, @b)
|
107
|
+
end
|
108
|
+
should "return a Hash with keys with different values of @a" do
|
109
|
+
expected=['a','b','c','d',10]
|
110
|
+
assert_equal(expected, @b.keys)
|
111
|
+
end
|
112
|
+
|
113
|
+
should "returns a Hash, which values are Statsample::Vector" do
|
114
|
+
@b.each_key {|k| assert_instance_of(Statsample::Vector, @b[k])}
|
115
|
+
end
|
116
|
+
should "hash values are n times the tokens appears" do
|
117
|
+
assert_counting_tokens(@b)
|
118
|
+
end
|
119
|
+
should "#split_by_separator_freq returns the number of ocurrences of tokens" do
|
120
|
+
assert_equal({'a'=>3,'b'=>1,'c'=>1,'d'=>2,10=>1}, @a.split_by_separator_freq())
|
121
|
+
end
|
122
|
+
should "using a different separator give the same values" do
|
123
|
+
a = Statsample::Vector.new(["a","a*b","c*d","a*d",10,nil],:nominal)
|
124
|
+
b=a.split_by_separator("*")
|
125
|
+
assert_counting_tokens(b)
|
126
|
+
end
|
127
|
+
end
|
64
128
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
129
|
+
|
130
|
+
should "have a name" do
|
131
|
+
@c.name=="Test Vector"
|
132
|
+
end
|
133
|
+
should "without explicit name, returns vector with succesive numbers" do
|
134
|
+
a=10.times.map{rand(100)}.to_scale
|
135
|
+
b=10.times.map{rand(100)}.to_scale
|
136
|
+
assert_match(/Vector \d+/, a.name)
|
137
|
+
a.name=~/Vector (\d+)/
|
138
|
+
next_number=$1.to_i+1
|
139
|
+
assert_equal("Vector #{next_number}",b.name)
|
140
|
+
end
|
141
|
+
should "save to a file and load the same Vector" do
|
142
|
+
outfile=Tempfile.new("vector.vec")
|
143
|
+
@c.save(outfile.path)
|
144
|
+
a=Statsample.load(outfile.path)
|
145
|
+
assert_equal(@c,a)
|
146
|
+
end
|
147
|
+
should "#collect returns an array" do
|
148
|
+
val=@c.collect {|v| v}
|
149
|
+
assert_equal(val,[5,5,5,5,5,6,6,7,8,9,10,1,2,3,4,nil,-99,-99])
|
150
|
+
end
|
151
|
+
|
152
|
+
should "#recode returns a recoded array" do
|
153
|
+
a=@c.recode{|v| @c.is_valid?(v) ? 0 : 1 }
|
154
|
+
exp=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1].to_vector
|
155
|
+
assert_equal(exp,a)
|
156
|
+
exp.recode!{|v| v==0 ? 1:0}
|
157
|
+
exp2=(([1]*15)+([0]*3)).to_vector
|
158
|
+
assert_equal(exp2,exp)
|
159
|
+
end
|
160
|
+
should "#product returns the * of all values" do
|
161
|
+
a=[1,2,3,4,5].to_vector(:scale)
|
162
|
+
assert_equal(120,a.product)
|
163
|
+
end
|
164
|
+
|
165
|
+
should "missing values" do
|
166
|
+
@c.missing_values=[10]
|
167
|
+
assert_equal([-99,-99,1,2,3,4,5,5,5,5,5,6,6,7,8,9], @c.valid_data.sort)
|
168
|
+
assert_equal([5,5,5,5,5,6,6,7,8,9,nil,1,2,3,4,nil,-99,-99], @c.data_with_nils)
|
169
|
+
@c.missing_values=[-99]
|
170
|
+
assert_equal(@c.valid_data.sort,[1,2,3,4,5,5,5,5,5,6,6,7,8,9,10])
|
171
|
+
assert_equal(@c.data_with_nils,[5,5,5,5,5,6,6,7,8,9,10,1,2,3,4,nil,nil,nil])
|
172
|
+
@c.missing_values=[]
|
173
|
+
assert_equal(@c.valid_data.sort,[-99,-99,1,2,3,4,5,5,5,5,5,6,6,7,8,9,10])
|
174
|
+
assert_equal(@c.data_with_nils,[5,5,5,5,5,6,6,7,8,9,10,1,2,3,4,nil,-99,-99])
|
175
|
+
|
176
|
+
end
|
177
|
+
should "correct has_missing_data? with missing data" do
|
178
|
+
a=[1,2,3,nil].to_vector
|
179
|
+
assert(a.has_missing_data?)
|
180
|
+
end
|
181
|
+
should "correct has_missing_data? without missing data" do
|
182
|
+
a=[1,2,3,4,10].to_vector
|
183
|
+
assert(!a.has_missing_data?)
|
184
|
+
end
|
185
|
+
should "with explicit missing_values, should respond has_missing_data?" do
|
186
|
+
a=[1,2,3,4,10].to_vector
|
187
|
+
a.missing_values=[10]
|
188
|
+
assert(a.has_missing_data?)
|
189
|
+
end
|
190
|
+
should "label correctly fields" do
|
191
|
+
@c.labels={5=>'FIVE'}
|
192
|
+
assert_equal(["FIVE","FIVE","FIVE","FIVE","FIVE",6,6,7,8,9,10,1,2,3,4,nil,-99, -99],@c.vector_labeled.to_a)
|
193
|
+
end
|
194
|
+
should "verify" do
|
195
|
+
h=@c.verify{|d| !d.nil? and d>0}
|
196
|
+
e={15=>nil,16=>-99,17=>-99}
|
197
|
+
assert_equal(e,h)
|
198
|
+
end
|
199
|
+
should "have a summary with name on it" do
|
200
|
+
|
201
|
+
assert_match(/#{@c.name}/, @c.summary)
|
202
|
+
end
|
203
|
+
should "have output dependent of #type" do
|
204
|
+
@c.type=:nominal
|
205
|
+
assert_match(/Distribution/, @c.summary())
|
206
|
+
@c.type=:ordinal
|
207
|
+
assert_match(/median/, @c.summary())
|
208
|
+
@c.type=:scale
|
209
|
+
assert_match(/mean/, @c.summary())
|
210
|
+
end
|
211
|
+
|
212
|
+
|
77
213
|
end
|
78
214
|
def test_split
|
79
215
|
a = Statsample::Vector.new(["a","a,b","c,d","a,d","d",10,nil],:nominal)
|
80
216
|
assert_equal([%w{a},%w{a b},%w{c d},%w{a d},%w{d},[10],nil], a.splitted)
|
81
217
|
end
|
82
|
-
def test_verify
|
83
|
-
h=@c.verify{|d| !d.nil? and d>0}
|
84
|
-
e={15=>nil,16=>-99,17=>-99}
|
85
|
-
assert_equal(e,h)
|
86
|
-
end
|
87
|
-
def test_split_by_separator
|
88
|
-
a = Statsample::Vector.new(["a","a,b","c,d","a,d",10,nil],:nominal)
|
89
|
-
b=a.split_by_separator(",")
|
90
|
-
assert_kind_of(Hash, b)
|
91
|
-
assert_instance_of(Statsample::Vector,b['a'])
|
92
|
-
assert_instance_of(Statsample::Vector,b['b'])
|
93
|
-
assert_instance_of(Statsample::Vector,b['c'])
|
94
|
-
assert_instance_of(Statsample::Vector,b['d'])
|
95
|
-
assert_instance_of(Statsample::Vector,b[10])
|
96
|
-
assert_equal([1,1,0,1,0,nil],b['a'].to_a)
|
97
|
-
assert_equal([0,1,0,0,0,nil],b['b'].to_a)
|
98
|
-
assert_equal([0,0,1,0,0,nil],b['c'].to_a)
|
99
|
-
assert_equal([0,0,1,1,0,nil],b['d'].to_a)
|
100
|
-
assert_equal([0,0,0,0,1,nil],b[10].to_a)
|
101
|
-
assert_equal({'a'=>3,'b'=>1,'c'=>1,'d'=>2,10=>1}, a.split_by_separator_freq())
|
102
218
|
|
103
|
-
|
104
|
-
b=a.split_by_separator("*")
|
105
|
-
assert_equal([1,1,0,1,0,nil],b['a'].to_a)
|
106
|
-
assert_equal([0,1,0,0,0,nil],b['b'].to_a)
|
107
|
-
assert_equal([0,0,1,0,0,nil],b['c'].to_a)
|
108
|
-
assert_equal([0,0,1,1,0,nil],b['d'].to_a)
|
109
|
-
assert_equal([0,0,0,0,1,nil],b[10].to_a)
|
110
|
-
end
|
219
|
+
|
111
220
|
def test_types
|
112
221
|
@c.type=:nominal
|
113
222
|
assert_raise NoMethodError do
|
@@ -175,14 +284,7 @@ class StatsampleTestVector < MiniTest::Unit::TestCase
|
|
175
284
|
assert_equal(0,vs.mean)
|
176
285
|
assert_equal(1,vs.sds)
|
177
286
|
end
|
178
|
-
|
179
|
-
@c.type=:nominal
|
180
|
-
assert_match(/Distribution/, @c.summary())
|
181
|
-
@c.type=:ordinal
|
182
|
-
assert_match(/median/, @c.summary())
|
183
|
-
@c.type=:scale
|
184
|
-
assert_match(/mean/, @c.summary())
|
185
|
-
end
|
287
|
+
|
186
288
|
def test_add
|
187
289
|
a=Statsample::Vector.new([1,2,3,4,5], :scale)
|
188
290
|
b=Statsample::Vector.new([11,12,13,14,15], :scale)
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statsample
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 9
|
8
|
-
- 0
|
9
|
-
version: 0.9.0
|
4
|
+
version: 0.10.0
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Claudio Bustos
|
@@ -35,129 +30,103 @@ cert_chain:
|
|
35
30
|
rpP0jjs0
|
36
31
|
-----END CERTIFICATE-----
|
37
32
|
|
38
|
-
date: 2010-04-
|
33
|
+
date: 2010-04-15 00:00:00 -04:00
|
39
34
|
default_executable:
|
40
35
|
dependencies:
|
41
36
|
- !ruby/object:Gem::Dependency
|
42
37
|
name: spreadsheet
|
43
|
-
|
44
|
-
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
41
|
requirements:
|
46
42
|
- - ~>
|
47
43
|
- !ruby/object:Gem::Version
|
48
|
-
segments:
|
49
|
-
- 0
|
50
|
-
- 6
|
51
|
-
- 0
|
52
44
|
version: 0.6.0
|
53
|
-
|
54
|
-
version_requirements: *id001
|
45
|
+
version:
|
55
46
|
- !ruby/object:Gem::Dependency
|
56
47
|
name: svg-graph
|
57
|
-
|
58
|
-
|
48
|
+
type: :runtime
|
49
|
+
version_requirement:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
51
|
requirements:
|
60
52
|
- - ~>
|
61
53
|
- !ruby/object:Gem::Version
|
62
|
-
segments:
|
63
|
-
- 1
|
64
|
-
- 0
|
65
54
|
version: "1.0"
|
66
|
-
|
67
|
-
version_requirements: *id002
|
55
|
+
version:
|
68
56
|
- !ruby/object:Gem::Dependency
|
69
57
|
name: reportbuilder
|
70
|
-
|
71
|
-
|
58
|
+
type: :runtime
|
59
|
+
version_requirement:
|
60
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
61
|
requirements:
|
73
62
|
- - ~>
|
74
63
|
- !ruby/object:Gem::Version
|
75
|
-
segments:
|
76
|
-
- 1
|
77
|
-
- 0
|
78
64
|
version: "1.0"
|
79
|
-
|
80
|
-
version_requirements: *id003
|
65
|
+
version:
|
81
66
|
- !ruby/object:Gem::Dependency
|
82
67
|
name: minimization
|
83
|
-
|
84
|
-
|
68
|
+
type: :runtime
|
69
|
+
version_requirement:
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
71
|
requirements:
|
86
72
|
- - ~>
|
87
73
|
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
- 1
|
91
|
-
- 0
|
92
|
-
version: 0.1.0
|
93
|
-
type: :runtime
|
94
|
-
version_requirements: *id004
|
74
|
+
version: 0.2.0
|
75
|
+
version:
|
95
76
|
- !ruby/object:Gem::Dependency
|
96
77
|
name: fastercsv
|
97
|
-
|
98
|
-
|
78
|
+
type: :runtime
|
79
|
+
version_requirement:
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
81
|
requirements:
|
100
82
|
- - ">="
|
101
83
|
- !ruby/object:Gem::Version
|
102
|
-
segments:
|
103
|
-
- 0
|
104
84
|
version: "0"
|
105
|
-
|
106
|
-
version_requirements: *id005
|
85
|
+
version:
|
107
86
|
- !ruby/object:Gem::Dependency
|
108
87
|
name: dirty-memoize
|
109
|
-
|
110
|
-
|
88
|
+
type: :runtime
|
89
|
+
version_requirement:
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
111
91
|
requirements:
|
112
92
|
- - ~>
|
113
93
|
- !ruby/object:Gem::Version
|
114
|
-
segments:
|
115
|
-
- 0
|
116
|
-
- 0
|
117
94
|
version: "0.0"
|
118
|
-
|
119
|
-
version_requirements: *id006
|
95
|
+
version:
|
120
96
|
- !ruby/object:Gem::Dependency
|
121
97
|
name: rubyforge
|
122
|
-
|
123
|
-
|
98
|
+
type: :development
|
99
|
+
version_requirement:
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
101
|
requirements:
|
125
102
|
- - ">="
|
126
103
|
- !ruby/object:Gem::Version
|
127
|
-
segments:
|
128
|
-
- 2
|
129
|
-
- 0
|
130
|
-
- 4
|
131
104
|
version: 2.0.4
|
132
|
-
|
133
|
-
version_requirements: *id007
|
105
|
+
version:
|
134
106
|
- !ruby/object:Gem::Dependency
|
135
107
|
name: hoe
|
136
|
-
|
137
|
-
|
108
|
+
type: :development
|
109
|
+
version_requirement:
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
111
|
requirements:
|
139
112
|
- - ">="
|
140
113
|
- !ruby/object:Gem::Version
|
141
|
-
segments:
|
142
|
-
- 2
|
143
|
-
- 6
|
144
|
-
- 0
|
145
114
|
version: 2.6.0
|
146
|
-
|
147
|
-
version_requirements: *id008
|
115
|
+
version:
|
148
116
|
description: |-
|
149
|
-
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)
|
117
|
+
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).
|
150
118
|
|
151
|
-
|
119
|
+
Include:
|
152
120
|
* Descriptive statistics: frequencies, median, mean, standard error, skew, kurtosis (and many others).
|
153
121
|
* Imports and exports datasets from and to Excel, CSV and plain text files.
|
154
|
-
* Correlations: Pearson's r, Spearman's rank correlation (rho), Tetrachoric, Polychoric
|
155
|
-
*
|
156
|
-
*
|
157
|
-
*
|
122
|
+
* Correlations: Pearson's r, Spearman's rank correlation (rho), Tetrachoric, Polychoric.
|
123
|
+
* Anova: generic and vector-based One-way ANOVA
|
124
|
+
* Tests: F, T, Levene, U-Mannwhitney.
|
125
|
+
* Regression: Simple, Multiple (OLS), Probit and Logit
|
126
|
+
* Factorial Analysis: Extraction (PCA and Principal Axis), Rotation (Varimax, Equimax, Quartimax) and Parallel Analysis, for estimation of number of factors.
|
158
127
|
* Dominance Analysis, with multivariate dependent and bootstrap (Azen & Budescu)
|
159
128
|
* Sample calculation related formulas
|
160
|
-
* Creates reports on text, html and rtf, using ReportBuilder
|
129
|
+
* Creates reports on text, html and rtf, using ReportBuilder gem
|
161
130
|
email:
|
162
131
|
- clbustos@gmail.com
|
163
132
|
executables:
|
@@ -183,15 +152,19 @@ files:
|
|
183
152
|
- data/tetmat_matrix.txt
|
184
153
|
- data/tetmat_test.txt
|
185
154
|
- examples/correlation_matrix.rb
|
155
|
+
- examples/dataset.rb
|
186
156
|
- examples/dominance_analysis.rb
|
187
157
|
- examples/dominance_analysis_bootstrap.rb
|
188
158
|
- examples/levene.rb
|
189
159
|
- examples/multiple_regression.rb
|
190
160
|
- examples/multivariate_correlation.rb
|
161
|
+
- examples/parallel_analysis.rb
|
162
|
+
- examples/parallel_analysis_tetrachoric.rb
|
191
163
|
- examples/polychoric.rb
|
192
164
|
- examples/principal_axis.rb
|
193
165
|
- examples/t_test.rb
|
194
166
|
- examples/tetrachoric.rb
|
167
|
+
- examples/vector.rb
|
195
168
|
- lib/distribution.rb
|
196
169
|
- lib/distribution/chisquare.rb
|
197
170
|
- lib/distribution/f.rb
|
@@ -215,6 +188,7 @@ files:
|
|
215
188
|
- lib/statsample/dominanceanalysis.rb
|
216
189
|
- lib/statsample/dominanceanalysis/bootstrap.rb
|
217
190
|
- lib/statsample/factor.rb
|
191
|
+
- lib/statsample/factor/parallelanalysis.rb
|
218
192
|
- lib/statsample/factor/pca.rb
|
219
193
|
- lib/statsample/factor/principalaxis.rb
|
220
194
|
- lib/statsample/factor/rotation.rb
|
@@ -256,8 +230,10 @@ files:
|
|
256
230
|
- po/es/statsample.po
|
257
231
|
- po/statsample.pot
|
258
232
|
- setup.rb
|
259
|
-
- test/
|
233
|
+
- test/test_anovaoneway.rb
|
234
|
+
- test/test_anovawithvectors.rb
|
260
235
|
- test/test_bivariate.rb
|
236
|
+
- test/test_bivariate_polychoric.rb
|
261
237
|
- test/test_codification.rb
|
262
238
|
- test/test_combination.rb
|
263
239
|
- test/test_crosstab.rb
|
@@ -304,20 +280,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
304
280
|
requirements:
|
305
281
|
- - ">="
|
306
282
|
- !ruby/object:Gem::Version
|
307
|
-
segments:
|
308
|
-
- 0
|
309
283
|
version: "0"
|
284
|
+
version:
|
310
285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
311
286
|
requirements:
|
312
287
|
- - ">="
|
313
288
|
- !ruby/object:Gem::Version
|
314
|
-
segments:
|
315
|
-
- 0
|
316
289
|
version: "0"
|
290
|
+
version:
|
317
291
|
requirements: []
|
318
292
|
|
319
293
|
rubyforge_project: ruby-statsample
|
320
|
-
rubygems_version: 1.3.
|
294
|
+
rubygems_version: 1.3.5
|
321
295
|
signing_key:
|
322
296
|
specification_version: 3
|
323
297
|
summary: A suite for basic and advanced statistics on Ruby
|
@@ -325,11 +299,11 @@ test_files:
|
|
325
299
|
- test/test_bivariate.rb
|
326
300
|
- test/test_dominance_analysis.rb
|
327
301
|
- test/test_factor.rb
|
328
|
-
- test/test_anova.rb
|
329
302
|
- test/test_permutation.rb
|
330
303
|
- test/test_codification.rb
|
331
304
|
- test/test_umannwhitney.rb
|
332
305
|
- test/test_helpers.rb
|
306
|
+
- test/test_anovawithvectors.rb
|
333
307
|
- test/test_crosstab.rb
|
334
308
|
- test/test_distribution.rb
|
335
309
|
- test/test_svg_graph.rb
|
@@ -339,6 +313,7 @@ test_files:
|
|
339
313
|
- test/test_combination.rb
|
340
314
|
- test/test_mle.rb
|
341
315
|
- test/test_resample.rb
|
316
|
+
- test/test_bivariate_polychoric.rb
|
342
317
|
- test/test_stratified.rb
|
343
318
|
- test/test_vector.rb
|
344
319
|
- test/test_srs.rb
|
@@ -354,3 +329,4 @@ test_files:
|
|
354
329
|
- test/test_dataset.rb
|
355
330
|
- test/test_regression.rb
|
356
331
|
- test/test_multiset.rb
|
332
|
+
- test/test_anovaoneway.rb
|