# confidence interval width for a rate of 2.5 events per unit and 20 events,
# using the score method
prec_rate(2.5, x = 20, met = "score")
# number of events to yield a CI width of 2.243 for a rate of 2.5 events per
# unit and 20 events, using the score method
prec_rate(2.5, conf.width = 2.243, met = "score")
# confidence interval width for a rate of 2.5 events per unit and 20 events,
# using the exact method
prec_rate(2.5, x = 20, met = "exact")
# vs and wald have the same conf.width, but different lwr and upr
prec_rate(2.5, x = 20, met = "vs")
prec_rate(2.5, x = 20, met = "wald")
Run the code above in your browser using DataLab