# 20 participants, a rate of 50% against a rate of 300\%
prec_rateratio(20, .5, 3)
# sample size required to attain a CI whose upper limit is not more than 3.81 larger
# than the lower limit
prec_rateratio(rate1 = .5, rate2 = 3, prec.level = 3.81)
Run the code above in your browser using DataLab