num4difftest 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +10 -0
- data/LICENSE +21 -0
- data/lib/num4difftest.rb +53 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8b6a7a17dfcc9562191d8bb9a232df11882a3faa1a99386661d38498aea0ad9a
|
4
|
+
data.tar.gz: fee87d215c4db3d159184fa762dc86f959b7184781eaea02ab192b58aa480741
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 463e9cd2f6981816bca848dbae169fdb2007875b475be71c46323545cd837bc25cfc154d623bb361ab419e18328d664e3d1d012000c8c7fdf9529be44784f041
|
7
|
+
data.tar.gz: 6d783a29cf7ac908957e41a13965bd7dbf9a0ae6cbf18e7f226a3497a0e3948f8c637395b95a6ac0826ba869bfdcef298e4fd8816f50d02e25c61b5a50a5d52d
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 siranovel
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/lib/num4difftest.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'num4tststatistic2'
|
2
|
+
require 'hypothTest3'
|
3
|
+
require 'num4anova'
|
4
|
+
|
5
|
+
module Num4DiffTestLib
|
6
|
+
# パラメトリック検定
|
7
|
+
class ParametrixTestLib
|
8
|
+
def initialize(hypothTest3)
|
9
|
+
@hypothTest3 = hypothTest3
|
10
|
+
@paraTest = Num4TstStatistic2Lib::ParametrixTestLib.new(@hypothTest3)
|
11
|
+
@oneWay = Num4AnovaLib::OneWayLayoutLib.new
|
12
|
+
@twoWay = Num4AnovaLib::TwoWayLayoutLib.new
|
13
|
+
end
|
14
|
+
def smple_diff_test(xi1, xi2, a)
|
15
|
+
raise TypeError unless @hypothTest3.kind_of?(HypothTest3IF)
|
16
|
+
|
17
|
+
if xi1.size == xi2.size then
|
18
|
+
return @paraTest.diffPopulationMean(xi1, xi2, a)
|
19
|
+
else
|
20
|
+
return @paraTest.diffPopulationVarMean(xi1, xi2, a)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
def mult_diff_test(xi1, a)
|
24
|
+
raise TypeError unless @hypothTest3.kind_of?(HypothTest3IF)
|
25
|
+
|
26
|
+
return @oneWay.oneway_anova(xi1, a)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
# ノンパラメトリック検定
|
30
|
+
class NonParametrixTestLib
|
31
|
+
def initialize(hypothTest3)
|
32
|
+
@hypothTest3 = hypothTest3
|
33
|
+
@nonParaTest = Num4TstStatistic2Lib::NonParametrixTestLib.new(@hypothTest3)
|
34
|
+
@oneWay = Num4AnovaLib::OneWayLayoutLib.new
|
35
|
+
@twoWay = Num4AnovaLib::TwoWayLayoutLib.new
|
36
|
+
end
|
37
|
+
def smple_diff_test(xi1, xi2, a)
|
38
|
+
raise TypeError unless @hypothTest3.kind_of?(HypothTest3IF)
|
39
|
+
|
40
|
+
if xi1.size == xi2.size then
|
41
|
+
return @nonParaTest.wilcoxon(xi1, xi2, a)
|
42
|
+
else
|
43
|
+
return @nonParaTest.utest(xi1, xi2, a)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
def mult_diff_test(xi1, a)
|
47
|
+
raise TypeError unless @hypothTest3.kind_of?(HypothTest3IF)
|
48
|
+
|
49
|
+
return @oneWay.kruskalwallis_test(xi1, a)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: num4difftest
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- siranovel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-05-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.2'
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.2.1
|
22
|
+
name: num4tststatistic2
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.2.1
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - "~>"
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0.1'
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.1.1
|
42
|
+
name: num4anova
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0.1'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.1.1
|
53
|
+
description: test of difference of population mean.
|
54
|
+
email: siranovel@gmail.com
|
55
|
+
executables: []
|
56
|
+
extensions: []
|
57
|
+
extra_rdoc_files: []
|
58
|
+
files:
|
59
|
+
- CHANGELOG.md
|
60
|
+
- Gemfile
|
61
|
+
- LICENSE
|
62
|
+
- lib/num4difftest.rb
|
63
|
+
homepage: https://github.com/siranovel/num4difftest
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubygems_version: 3.3.26
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: test of difference!
|
86
|
+
test_files: []
|