public void DeLongComparisonTest()
{
// Example from Sampling Variability of Nonparametric Estimates of the
// Areas under Receiver Operating Characteristic Curves: An Update
bool yes = true;
bool no = false;
bool[] expected =
{
/* 1*/ yes,
/* 2*/ no,
/* 3*/ yes,
/* 4*/ no,
/* 5*/ no,
/* 6*/ yes,
/* 7*/ yes,
/* 8*/ no,
/* 9*/ no,
/*10*/ yes,
/*11*/ no,
/*12*/ no,
/*13*/ yes,
/*14*/ no,
/*15*/ no
};
int[] actual1 =
{
/* 1*/ 1,
/* 2*/ 2,
/* 3*/ 5,
/* 4*/ 1,
/* 5*/ 1,
/* 6*/ 1,
/* 7*/ 2,
/* 8*/ 1,
/* 9*/ 2,
/*10*/ 2,
/*11*/ 1,
/*12*/ 1,
/*13*/ 5,
/*14*/ 1,
/*15*/ 1
};
int[] actual2 =
{
/* 1*/ 1,
/* 2*/ 1,
/* 3*/ 5,
/* 4*/ 1,
/* 5*/ 1,
/* 6*/ 1,
/* 7*/ 4,
/* 8*/ 1,
/* 9*/ 2,
/*10*/ 2,
/*11*/ 1,
/*12*/ 1,
/*13*/ 5,
/*14*/ 1,
/*15*/ 1
};
ReceiverOperatingCharacteristic a = new ReceiverOperatingCharacteristic(expected, actual1);
ReceiverOperatingCharacteristic b = new ReceiverOperatingCharacteristic(expected, actual2);
a.Compute(10);
b.Compute(10);
TwoReceiverOperatingCurveTest test = new TwoReceiverOperatingCurveTest(a, b);
Assert.AreEqual(-1.1351915229662422, test.Statistic);
}
}