Sha256: 60e85bfa02169fc867401c7f5aa5cb330fea9e4223083e146f958fbd7bf6e73e
Contents?: true
Size: 905 Bytes
Versions: 5
Compression:
Stored size: 905 Bytes
Contents
require(File.expand_path(File.dirname(__FILE__)+'/helpers_tests.rb')) class StatsampleBartlettSphericityTestCase < MiniTest::Unit::TestCase include Statsample::Test context Statsample::Test::BartlettSphericity do setup do @v1=[1 ,2 ,3 ,4 ,7 ,8 ,9 ,10,14,15,20,50,60,70].to_scale @v2=[5 ,6 ,11,12,13,16,17,18,19,20,30,0,0,0].to_scale @v3=[10,3 ,20,30,40,50,80,10,20,30,40,2,3,4].to_scale # KMO: 0.490 ds={'v1'=>@v1,'v2'=>@v2,'v3'=>@v3}.to_dataset cor=Statsample::Bivariate.correlation_matrix(ds) @bs=Statsample::Test::BartlettSphericity.new(cor, 14) end should "have correct value for chi" do assert_in_delta(9.477, @bs.value,0.001) end should "have correct value for df" do assert_equal(3, @bs.df) end should "have correct value for probability" do assert_in_delta(0.024,@bs.probability,0.001) end end end
Version data entries
5 entries across 5 versions & 1 rubygems