Module: Rust::StatisticalTests::PValueAdjustment

Defined in:
lib/rust/stats/tests.rb

Overview

Module with utilities for adjusting the p-values.

Defined Under Namespace

Classes: BenjaminiHochberg, BenjaminiYekutieli, Bonferroni, Hochberg, Holm, Hommel

Class Method Summary collapse

Class Method Details

.method(name) ⇒ Object

Returns the Ruby class given the R name of the p-value adjustment method.



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/rust/stats/tests.rb', line 274

def self.method(name)
    name = name.to_s
    case name.downcase
    when "bonferroni", "b"
        return Bonferroni
    when "holm", "h"
        return Holm
    when "hochberg"
        return Hochberg
    when "hommel"
        return Hommel
    when "benjaminihochberg", "bh"
        return BenjaminiHochberg
    when "benjaminiyekutieli", "by"
        return BenjaminiYekutieli
    end
end