def test_match_sas_se(self): sas_se = 0.009354 irc = incidence_rate_ci(14, 400) npt.assert_allclose(irc.standard_error, sas_se, atol=1e-5)
def test_match_normalapprox_ci(self): # Because incidence rate CI's have no agreed convention, I use the normal approx. This is not the same as SAS sas_ci = 0.01667, 0.05333 i = incidence_rate_ci(14, 400) npt.assert_allclose(np.round(i[1:3], 5), sas_ci, atol=1e-5)
def test_incidence_rate(self): irc = incidence_rate_ci(14, 400) npt.assert_allclose(irc.point_estimate, 0.035)