Class: Num4MultiCompLib::NonParametrixTestLib

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

Overview

ノンパラメトリック検定

Instance Method Summary collapse

Constructor Details

#initializeNonParametrixTestLib

Returns a new instance of NonParametrixTestLib.



77
78
79
# File 'lib/num4multicomp.rb', line 77

def initialize
    @nonParamTest = MultiComp::NonParametrixTest.getInstance()
end

Instance Method Details

#bonferrono_test(xi, a) ⇒ Array

ボンフェロー二の不等式による多重比較(マン・ホイットニーU検定)

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],
]
nonParaTest = MultiCompLib::NonParametrixTestLib.new
nonParaTest.bonferrono_test(xi, 0.05)
=> 
  [
    [false, false, true,  true,  true],
    [false, false, false, true,  true],
    [false, false, false, true,  false],
    [false, false, false, false, true],
    [false, false, false, false, false],
 ]

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

Parameters:

Returns:



104
105
106
107
# File 'lib/num4multicomp.rb', line 104

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