Sha256: 353e11d36ba2bd8a5825acb12ee113faa833a20fedba256dc633a9bbae692f1e

Contents?: true

Size: 1.32 KB

Versions: 8

Compression:

Stored size: 1.32 KB

Contents

require(File.expand_path(File.dirname(__FILE__)+'/helpers_tests.rb'))
class StatsampleAnovaTwoWayTestCase < MiniTest::Unit::TestCase
  context(Statsample::Anova::TwoWay) do
    setup do
      @ss_a=192.2
      @ss_b=57.8
      @ss_axb=168.2
      @ss_within=75.6
      @df_a=@df_b=1
      @df_within=16
      @anova=Statsample::Anova::TwoWay.new(:ss_a=>@ss_a, :ss_b=>@ss_b, :ss_axb=>@ss_axb, :ss_within=>@ss_within , :df_a=>@df_a, :df_b=>@df_b, :df_within=>@df_within)
    end
    should "Statsample::Anova.twoway respond to #twoway" do
    assert(Statsample::Anova.respond_to? :twoway)
    end
    should "return correct value for ms_a, ms_b and ms_axb" do
      assert_in_delta(192.2, @anova.ms_a, 0.01)
      assert_in_delta(57.8, @anova.ms_b, 0.01)
      assert_in_delta(168.2, @anova.ms_axb, 0.01)
      
    end
    should "return correct value for f " do
      assert_in_delta(40.68, @anova.f_a, 0.01)
      assert_in_delta(12.23, @anova.f_b, 0.01)
      assert_in_delta(35.60, @anova.f_axb, 0.01)
    end
    should "return correct value for probability for f " do
      assert(@anova.f_a_probability < 0.05)
      assert(@anova.f_b_probability < 0.05)
      assert(@anova.f_axb_probability < 0.05)
    end

    should "respond to summary" do
      assert(@anova.respond_to? :summary)
      assert(@anova.summary.size>0)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
statsample-1.4.1 test/test_anovatwoway.rb
statsample-1.4.0 test/test_anovatwoway.rb
statsample-1.3.1 test/test_anovatwoway.rb
statsample-1.3.0 test/test_anovatwoway.rb
statsample-1.2.0 test/test_anovatwoway.rb
statsample-1.1.0 test/test_anovatwoway.rb
statsample-1.0.1 test/test_anovatwoway.rb
statsample-1.0.0 test/test_anovatwoway.rb