Sha256: 174f0724677bd7753a1785fbd6b09350df559c84a4b5494706239a1a0bf7560c

Contents?: true

Size: 1.3 KB

Versions: 13

Compression:

Stored size: 1.3 KB

Contents

require(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

13 entries across 13 versions & 1 rubygems

Version Path
statsample-0.18.0 test/test_anovatwoway.rb
statsample-0.17.0 test/test_anovatwoway.rb
statsample-0.16.0 test/test_anovatwoway.rb
statsample-0.15.1 test/test_anovatwoway.rb
statsample-0.15.0 test/test_anovatwoway.rb
statsample-0.14.1 test/test_anovatwoway.rb
statsample-0.14.0 test/test_anovatwoway.rb
statsample-0.13.1 test/test_anovatwoway.rb
statsample-0.13.0 test/test_anovatwoway.rb
statsample-0.12.0 test/test_anovatwoway.rb
statsample-0.11.2 test/test_anovatwoway.rb
statsample-0.11.1 test/test_anovatwoway.rb
statsample-0.11.0 test/test_anovatwoway.rb