# For small N, changes in rates should result in same p-value minus floating point differences
e_test(3,0)
e_test(3,0,2,2)
# Not defined
e_test(0,0) #returns -1 and prints warning
# The same rates
e_test(20,10,4,2)
e_test(10,5,2,1) #not quite the same
# Order of counts/rates should not matter
e_test(6,2) #second example from Krishnamoorthy article
e_test(2,6) #when d=0, can switch arguments and get the same p-value
# These are not the same however, due to how the variance estimates work
e_test(3,2)
e_test(3,1,d=1)
Run the code above in your browser using DataLab