def test_sensitivity_same_as_calc(self, test_data): se = Sensitivity() se.fit(test_data, test='test', disease='case') sens = sensitivity(40, 50) npt.assert_allclose(se.sensitivity, sens[0])
def test_sensitivity_match_sas_ci(self): sas_ci = (0.361409618, 0.638590382) r = sensitivity(25, 50, confint='wald') npt.assert_allclose(r[1:3], sas_ci)
def test_sensitivity_match_sas_se(self): sas_se = 0.070710678 r = sensitivity(25, 50, confint='wald') npt.assert_allclose(r[3], sas_se)
def test_correct_sensitivity(self): r = sensitivity(25, 50) assert r[0] == 0.5