statsample 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data.tar.gz.sig +2 -1
  2. data/History.txt +11 -0
  3. data/Manifest.txt +2 -3
  4. data/README.txt +0 -17
  5. data/Rakefile +10 -9
  6. data/data/locale/es/LC_MESSAGES/statsample.mo +0 -0
  7. data/examples/principal_axis.rb +2 -0
  8. data/examples/u_test.rb +8 -0
  9. data/lib/distribution.rb +1 -1
  10. data/lib/statsample.rb +12 -12
  11. data/lib/statsample/anova/oneway.rb +4 -4
  12. data/lib/statsample/bivariate.rb +10 -3
  13. data/lib/statsample/bivariate/pearson.rb +55 -0
  14. data/lib/statsample/dataset.rb +57 -49
  15. data/lib/statsample/dominanceanalysis.rb +1 -2
  16. data/lib/statsample/dominanceanalysis/bootstrap.rb +46 -54
  17. data/lib/statsample/factor.rb +0 -1
  18. data/lib/statsample/factor/parallelanalysis.rb +9 -13
  19. data/lib/statsample/factor/pca.rb +5 -10
  20. data/lib/statsample/factor/principalaxis.rb +27 -33
  21. data/lib/statsample/matrix.rb +11 -11
  22. data/lib/statsample/mle.rb +0 -1
  23. data/lib/statsample/regression.rb +0 -1
  24. data/lib/statsample/reliability.rb +2 -2
  25. data/lib/statsample/reliability/multiscaleanalysis.rb +62 -15
  26. data/lib/statsample/reliability/scaleanalysis.rb +5 -6
  27. data/lib/statsample/test/f.rb +2 -5
  28. data/lib/statsample/test/levene.rb +2 -5
  29. data/lib/statsample/test/t.rb +4 -13
  30. data/lib/statsample/test/umannwhitney.rb +19 -19
  31. data/po/es/statsample.mo +0 -0
  32. data/po/es/statsample.po +304 -111
  33. data/po/statsample.pot +224 -90
  34. data/test/test_bivariate.rb +8 -69
  35. data/test/test_reliability.rb +3 -4
  36. metadata +30 -18
  37. metadata.gz.sig +0 -0
  38. data/lib/statsample/bivariate/polychoric.rb +0 -893
  39. data/lib/statsample/bivariate/tetrachoric.rb +0 -457
  40. data/test/test_bivariate_polychoric.rb +0 -70
@@ -1,70 +0,0 @@
1
- require(File.dirname(__FILE__)+'/helpers_tests.rb')
2
-
3
- class StatsampleBivariatePolychoricTestCase < MiniTest::Unit::TestCase
4
- context Statsample::Bivariate do
5
- should "responde to polychoric_correlation_matrix" do
6
- a=([1,1,2,2,2,3,3,3,2,2,3,3,3]*4).to_scale
7
- b=([1,2,2,2,1,3,2,3,2,2,3,3,2]*4).to_scale
8
- c=([1,1,1,2,2,2,2,3,2,3,2,2,3]*4).to_scale
9
- ds={'a'=>a,'b'=>b,'c'=>c}.to_dataset
10
- assert(Statsample::Bivariate.polychoric_correlation_matrix(ds).is_a? ::Matrix)
11
- end
12
- end
13
- context Statsample::Bivariate::Polychoric do
14
- setup do
15
- matrix=Matrix[[58,52,1],[26,58,3],[8,12,9]]
16
- @poly=Statsample::Bivariate::Polychoric.new(matrix)
17
- end
18
- should "have summary.size > 0" do
19
- assert(@poly.summary.size>0)
20
- end
21
- should "compute two step mle with ruby" do
22
- @poly.compute_two_step_mle_drasgow_ruby
23
- assert_in_delta(0.420, @poly.r, 0.001)
24
- assert_in_delta(-0.240, @poly.threshold_y[0],0.001)
25
- assert_in_delta(-0.027, @poly.threshold_x[0],0.001)
26
- assert_in_delta(1.578, @poly.threshold_y[1],0.001)
27
- assert_in_delta(1.137, @poly.threshold_x[1],0.001)
28
- end
29
- should "compute two-step with gsl" do
30
- if Statsample.has_gsl?
31
- @poly.compute_two_step_mle_drasgow_gsl
32
- assert_in_delta(0.420, @poly.r, 0.001)
33
- assert_in_delta(-0.240, @poly.threshold_y[0],0.001)
34
- assert_in_delta(-0.027, @poly.threshold_x[0],0.001)
35
- assert_in_delta(1.578, @poly.threshold_y[1],0.001)
36
- assert_in_delta(1.137, @poly.threshold_x[1],0.001)
37
- else
38
- skip "Requires GSL"
39
- end
40
- end
41
- should "compute polychoric series" do
42
- if Statsample.has_gsl?
43
- @poly.method=:polychoric_series
44
- @poly.compute
45
- assert_in_delta(0.556, @poly.r, 0.001)
46
- assert_in_delta(-0.240, @poly.threshold_y[0],0.001)
47
- assert_in_delta(-0.027, @poly.threshold_x[0],0.001)
48
- assert_in_delta(1.578, @poly.threshold_y[1],0.001)
49
- assert_in_delta(1.137, @poly.threshold_x[1],0.001)
50
- end
51
- end
52
- if true and Statsample.has_gsl?
53
- context "compute joint" do
54
- setup do
55
- @poly.method=:joint
56
- @poly.compute
57
- end
58
- should "have correct values" do
59
- assert_equal(:joint, @poly.method)
60
- assert_in_delta(0.4192, @poly.r, 0.0001)
61
- assert_in_delta(-0.2421, @poly.threshold_y[0],0.0001)
62
- assert_in_delta(-0.0297, @poly.threshold_x[0],0.0001)
63
- assert_in_delta(1.5938, @poly.threshold_y[1],0.0001)
64
- assert_in_delta(1.1331, @poly.threshold_x[1],0.0001)
65
- end
66
- end
67
- end
68
- end
69
-
70
- end