Class: Num4MultiCompLib::ParametrixTestLib

Inherits:
Object
  • Object
show all
Includes:
DunnetTestLib
Defined in:
lib/num4multicomp.rb

Overview

パラメトリック検定

Instance Method Summary collapse

Methods included from DunnetTestLib

#leftside_test, #rightside_test, #twoside_test

Constructor Details

#initializeParametrixTestLib

Returns a new instance of ParametrixTestLib.



15
16
17
# File 'lib/num4multicomp.rb', line 15

def initialize
    @paramTest = MultiComp::ParametrixTest.getInstance()
end

Instance Method Details

#bonferrono_test(xi, a) ⇒ Array

ボンフェロー二の不等式による多重比較(T検定)

Examples:

xi = [
    [12.2, 18.8, 18.2],
    [22.2, 20.5, 14.6],
    [20.8, 19.5, 26.3],
    [26.4, 32.5, 31.3],
    [24.5, 21.2, 22.4],
]
paraTest = MultiCompLib::ParametrixTestLib.new
paraTest.bonferrono_test(xi, 0.05)
=> 
  [
    [false, false, false, true, false],
    [false, false, false, true, false],
    [false, false, false, false, false],
    [false, false, false, false, false],
    [false, false, false, false, false],
 ]

Returns 検定結果(boolean[] true:棄却域内 false:棄却域外).

Parameters:

Returns:



70
71
72
73
# File 'lib/num4multicomp.rb', line 70

def bonferrono_test(xi, a)
    ret = @paramTest.bonferronoTest(xi.to_java(Java::double[]), a)
    return ret.to_a
end

#turkey_test(xi, a) ⇒ Array

turkeyの方法による多重比較

Examples:

xi = [
    [12.2, 18.8, 18.2],
    [22.2, 20.5, 14.6],
    [20.8, 19.5, 26.3],
    [26.4, 32.5, 31.3],
    [24.5, 21.2, 22.4],
]
paraTest = MultiCompLib::ParametrixTestLib.new
paraTest.turkey_test(xi, 0.05)
=> 
  [
    [false, false, false, true, false],
    [false, false, false, true, false],
    [false, false, false, false, false],
    [false, false, false, false, false],
    [false, false, false, false, false],
 ]

Returns 検定結果(boolean[] true:棄却域内 false:棄却域外).

Parameters:

Returns:



42
43
44
45
# File 'lib/num4multicomp.rb', line 42

def turkey_test(xi, a)
    ret = @paramTest.turkeyTest(xi.to_java(Java::double[]), a)
    return ret.to_a
end