def test_specificity_same_as_calc(self, test_data): sp = Specificity() sp.fit(test_data, test='test', disease='case') spec = specificity(15, 50) npt.assert_allclose(sp.specificity, spec[0])
def test_specificity_match_sas_ci(self): sas_ci = (0.361409618, 0.638590382) r = specificity(25, 50, confint='wald') npt.assert_allclose(r[1:3], sas_ci)
def test_specificity_match_sas_se(self): sas_se = 0.070710678 r = specificity(25, 50, confint='wald') npt.assert_allclose(r[3], sas_se)
def test_correct_specificity(self): r = specificity(25, 50) assert r[0] == 0.5