Class: Num4TstStatistic2Lib::DecorrTestLib
- Inherits:
-
Object
- Object
- Num4TstStatistic2Lib::DecorrTestLib
- Defined in:
- lib/num4tststatistic2.rb
Overview
無相関の検定
Instance Method Summary collapse
-
#initialize ⇒ DecorrTestLib
constructor
A new instance of DecorrTestLib.
-
#kendallscorr(x, y, a) ⇒ boolean
ケンドールの順位相関係数.
-
#pearsoCorrelation(x, y, a) ⇒ boolean
ピアソン相関係数 (相関係数の検定).
-
#spearmanscorr(x, y, a) ⇒ boolean
スピアマンの順位相関係数.
Constructor Details
#initialize ⇒ DecorrTestLib
Returns a new instance of DecorrTestLib.
304 305 306 307 308 |
# File 'lib/num4tststatistic2.rb', line 304 def initialize @paraTest = Num4TstStatisticLib::ParametrixTestLib.new @nonParaTest = Num4TstStatisticLib::NonParametrixTestLib.new @hypothTest = Num4HypothTestLib::DecorrTestLib.new end |
Instance Method Details
#kendallscorr(x, y, a) ⇒ boolean
ケンドールの順位相関係数
359 360 361 362 363 |
# File 'lib/num4tststatistic2.rb', line 359 def kendallscorr(x, y, a) df = x.size - 2 statistic = @nonParaTest.kendallscorr(x, y) return @hypothTest.twoSideTest(statistic, df, a) end |
#pearsoCorrelation(x, y, a) ⇒ boolean
ピアソン相関係数
(相関係数の検定)
323 324 325 326 327 |
# File 'lib/num4tststatistic2.rb', line 323 def pearsoCorrelation(x, y, a) df = x.size - 2 statistic = @paraTest.pearsoCorrelation(x, y) return @hypothTest.twoSideTest(statistic, df, a) end |
#spearmanscorr(x, y, a) ⇒ boolean
スピアマンの順位相関係数
341 342 343 344 345 |
# File 'lib/num4tststatistic2.rb', line 341 def spearmanscorr(x, y, a) df = x.size - 2 statistic = @nonParaTest.spearmanscorr(x, y) return @hypothTest.twoSideTest(statistic, df, a) end |