/** Test of test method, of class Logrank. */ @Test public void testTest() { System.out.println("test"); // Example from Dimaki's Survival Non-parametrics notes. It should reject the null hypothesis // and return true. TransposeDataCollection transposeDataCollection = new TransposeDataCollection(); transposeDataCollection.put( 0, new FlatDataCollection(Arrays.asList(new Object[] {23, "16+", "18+", "20+", "24+"}))); transposeDataCollection.put( 1, new FlatDataCollection(Arrays.asList(new Object[] {15, 18, 19, 19, 20.0}))); boolean is_twoTailed = true; double aLevel = 0.05; boolean expResult = true; boolean result = Logrank.test(transposeDataCollection, is_twoTailed, aLevel); assertEquals(expResult, result); }
/** Test of testVariances method, of class LevenesIndependentSamples. */ @Test public void testTestVariances() { logger.info("testVariances"); TransposeDataCollection transposeDataCollection = new TransposeDataCollection(); transposeDataCollection.put( 0, new FlatDataCollection(Arrays.asList(new Object[] {60.8, 57.0, 65.0, 58.6, 61.7}))); transposeDataCollection.put( 1, new FlatDataCollection(Arrays.asList(new Object[] {68.7, 67.7, 74.0, 66.3, 69.8}))); transposeDataCollection.put( 2, new FlatDataCollection(Arrays.asList(new Object[] {102.6, 103.1, 100.2, 96.5}))); transposeDataCollection.put( 3, new FlatDataCollection(Arrays.asList(new Object[] {87.9, 84.2, 83.1, 85.7, 90.3}))); double aLevel = 0.05; boolean expResult = true; boolean result = LevenesIndependentSamples.testVariances(transposeDataCollection, aLevel); assertEquals(expResult, result); }